結果
問題 |
No.305 鍵(2)
|
ユーザー |
![]() |
提出日時 | 2015-11-27 23:44:05 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 438 bytes |
コンパイル時間 | 726 ms |
コンパイル使用メモリ | 70,508 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 13.38 |
最終ジャッジ日時 | 2024-07-16 06:43:51 |
合計ジャッジ時間 | 3,576 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 11 |
ソースコード
#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) << i<<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; }