結果

問題 No.815 Are you a traveller ?
ユーザー giru_yukikogiru_yukiko
提出日時 2019-05-27 21:25:51
言語 C
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 28,248 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-17 18:18:20
合計ジャッジ時間 692 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,348 KB
testcase_01 AC 1 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 1 ms
4,348 KB
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
    3 | main(){
      | ^~~~

ソースコード

diff #

#include <stdio.h>

main(){
	int person;
	char buf[100];

	fgets(buf,sizeof(buf),stdin);
	sscanf(buf,"%d",&person);

	switch(person%2){
		case 0:
			printf("%d\n",person/2);
			break;
		case 1:
			printf("%d\n",person/2+1);
			break;
	}


	return(0);
}
0