結果
| 問題 |
No.304 鍵(1)
|
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2016-08-26 13:48:09 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 59 ms / 2,000 ms |
| コード長 | 235 bytes |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 20,736 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 309.17 |
| 最終ジャッジ日時 | 2024-07-17 00:20:56 |
| 合計ジャッジ時間 | 1,093 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:11:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%s", state);
| ^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <string.h>
int main() {
char state[9];
int i;
for (i = 0; i <= 999; i++) {
printf("%03d\n", i);
fflush(stdout);
scanf("%s", state);
if (strcmp(state, "unlocked") == 0) return 0;
}
return 0;
}
くれちー