結果

問題 No.304 鍵(1)
ユーザー tassi_2012
提出日時 2015-12-17 10:34:32
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 249 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 20,480 KB
実行使用メモリ 25,220 KB
平均クエリ数 309.17
最終ジャッジ日時 2024-07-16 22:04:06
合計ジャッジ時間 981 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:12:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 |                 scanf("%s", result);
      |                 ^~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include<stdio.h>
#include<string.h>

int main(void)
{
	int password = 0;
	char locked[] = "locked";
	char result[255];
	do{
		printf("%03d\n", password++);
		fflush(stdout);
		scanf("%s", result);
	}while(strcmp(result, locked) == 0);
	return 0;
}
0