結果
問題 |
No.305 鍵(2)
|
ユーザー |
![]() |
提出日時 | 2015-11-27 23:48:26 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 440 bytes |
コンパイル時間 | 542 ms |
コンパイル使用メモリ | 70,652 KB |
実行使用メモリ | 40,720 KB |
平均クエリ数 | 5.54 |
最終ジャッジ日時 | 2024-07-16 06:44:09 |
合計ジャッジ時間 | 4,590 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 2 TLE * 1 -- * 10 |
ソースコード
#include<iostream> #include<iomanip> #include<vector> #include<string> #include<math.h> using namespace std; int main(){ int k,i,j,X,X0; string s; i=0; j=0; k=0; X0=0; while(1){ if(j>10)break; cout << setfill('0') << setw(10) << k<<endl; cin>>X>>s; if(s=="unlocked")break; else if(X==X0){ i++; k=k+i*pow(10,j); } else if(X>X0){ i=1; j++; k=k+i*pow(10,j); X0=X; } else if(X<X0){ i=1; j++; k=k+i*pow(10,j)-pow(10,(j-1)); } } return 0; }