結果
問題 |
No.305 鍵(2)
|
ユーザー |
![]() |
提出日時 | 2016-05-31 19:02:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 728 bytes |
コンパイル時間 | 672 ms |
コンパイル使用メモリ | 68,864 KB |
実行使用メモリ | 25,604 KB |
平均クエリ数 | 45.31 |
最終ジャッジ日時 | 2024-07-16 10:14:32 |
合計ジャッジ時間 | 3,444 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 7 |
ソースコード
#include <iostream> #include <string> #include <iomanip> #include <math.h> using namespace std; int main() { string s; int n=0; int atari=0; int t,prevt; cout << "0000000000" << endl; cin >> prevt >> s; if(s == "unlocked") return 0; n++; for(int i=0;i<10;i++){ n = pow(10,(double)i); for(int j=1;j<10;j++){ cout << setw(10) << setfill('0') << n << endl; cin >> t >> s; if(s == "unlocked") return 0; if(t != prevt){ if(t>prevt) atari += j*pow(10,(double)i); else if(t<prevt) atari += (j-1)*pow(10,(double)i); break; } n += pow(10,(double)i); } } cout << setw(10) << setfill('0') << atari << endl; cin >> t >> s; if(s == "unlocked") return 0; return 0; }