結果
| 問題 |
No.304 鍵(1)
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-11-27 22:54:37 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 2,000 ms |
| コード長 | 315 bytes |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 23,296 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 309.17 |
| 最終ジャッジ日時 | 2024-07-16 21:48:16 |
| 合計ジャッジ時間 | 1,061 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:14:41: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[10]’ [-Wformat=]
14 | scanf("%s",&res);
| ~^ ~~~~
| | |
| | char (*)[10]
| char*
main.cpp:14:38: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
14 | scanf("%s",&res);
| ~~~~~^~~~~~~~~~~
ソースコード
#include <cstdio>
int main(){
char s[5]={},res[10];
for(char i='0';i<'0'+10;i++){
s[0]=i;
for(char j='0';j<'0'+10;j++){
s[1]=j;
for(char k='0';k<'0'+10;k++){
s[2]=k;
printf("%s\n",s);
fflush(stdout);
scanf("%s",&res);
if(res[0]=='u'){
return 0;
}
}
}
}
return 0;
}
184