結果
問題 |
No.305 鍵(2)
|
ユーザー |
![]() |
提出日時 | 2016-03-08 15:53:31 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 495 bytes |
コンパイル時間 | 479 ms |
コンパイル使用メモリ | 58,676 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 101.00 |
最終ジャッジ日時 | 2024-07-16 08:46:27 |
合計ジャッジ時間 | 3,925 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 13 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:15:15: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | scanf("%d",&match); | ~~~~~^~~~~~~~~~~~~
ソースコード
#include <iostream> #include <cmath> using namespace std; int main(){ int num[10] = {}; for(int i = 0;i < 10;i++){ int match = 0; for(int j = 0;j < 10;j++){ for(int k = 0;k < 10;k++){ if(i == k) cout << j; else cout << 'x'; } cout << endl; scanf("%d",&match); if(match == 1){ num[i] = j; break; } } } for(int i = 0;i < 10;i++) cout << num[i]; cout << endl; }