結果
| 問題 |
No.304 鍵(1)
|
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-11-27 22:53:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 320 bytes |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 21,888 KB |
| 実行使用メモリ | 25,604 KB |
| 平均クエリ数 | 1.00 |
| 最終ジャッジ日時 | 2024-07-16 06:40:08 |
| 合計ジャッジ時間 | 1,843 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 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';k++){
s[2]=k;
printf("%s\n",s);
fflush(stdout);
scanf("%s",&res);
if(res[0]=='u'){
return 0;
}
}
}
}
return 0;
}
184