結果
問題 |
No.304 鍵(1)
|
ユーザー |
![]() |
提出日時 | 2025-03-07 16:50:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 254 bytes |
コンパイル時間 | 331 ms |
コンパイル使用メモリ | 26,496 KB |
実行使用メモリ | 26,344 KB |
平均クエリ数 | 1.00 |
最終ジャッジ日時 | 2025-03-07 16:50:18 |
合計ジャッジ時間 | 2,239 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 6 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:10:41: warning: format ‘%c’ expects argument of type ‘char*’, but argument 2 has type ‘int’ [-Wformat=] 10 | scanf("%c",key); | ~^ ~~~ | | | | | int | char* main.cpp:10:38: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%c",key); | ~~~~~^~~~~~~~~~ main.cpp:10:38: warning: ‘key’ is used uninitialized [-Wuninitialized] 10 | scanf("%c",key); | ~~~~~^~~~~~~~~~ main.cpp:4:14: note: ‘key’ was declared here 4 | char key; | ^~~
ソースコード
#include <stdio.h> int main(){ char key; for(int i = 0;i < 10;i++){ for(int j = 0;j < 10;j++){ for(int k = 0;k < 10;k++){ printf("%d%d%d",i,j,k); fflush(stdout); scanf("%c",key); if(key == 'u'){ return 0; } } } } }