提出 #676479


ソースコード 拡げる

#include <stdio.h>

int main(void)
{
	int n;
	
	scanf("%d", &n);
	
	if (n % 2 == 0){
		n -= 1;
	}
	else {
		n += 1;
	}
	
	printf("%d\n", n);
	
	return (0);
}

提出情報

提出日時
問題 B - ペア
ユーザ J0riridk0
言語 C (GCC 4.9.2)
得点 100
コード長 175 Byte
結果 AC
実行時間 27 ms
メモリ 804 KiB

コンパイルエラー

./Main.c: In function ‘main’:
./Main.c:7:2: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &n);
  ^

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 2
AC × 22
セット名 テストケース
Sample s0.txt, s1.txt
All 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, s0.txt, s1.txt
ケース名 結果 実行時間 メモリ
000.txt AC 25 ms 792 KiB
001.txt AC 23 ms 792 KiB
002.txt AC 24 ms 792 KiB
003.txt AC 25 ms 700 KiB
004.txt AC 27 ms 692 KiB
005.txt AC 23 ms 668 KiB
006.txt AC 23 ms 800 KiB
007.txt AC 21 ms 800 KiB
008.txt AC 23 ms 704 KiB
009.txt AC 23 ms 800 KiB
010.txt AC 26 ms 792 KiB
011.txt AC 22 ms 804 KiB
012.txt AC 24 ms 792 KiB
013.txt AC 24 ms 800 KiB
014.txt AC 24 ms 800 KiB
015.txt AC 25 ms 804 KiB
016.txt AC 25 ms 796 KiB
017.txt AC 24 ms 704 KiB
018.txt AC 23 ms 708 KiB
019.txt AC 23 ms 804 KiB
s0.txt AC 23 ms 800 KiB
s1.txt AC 27 ms 800 KiB