結果

問題 No.305 鍵(2)
ユーザー napppolinapppoli
提出日時 2015-11-27 23:48:26
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 440 bytes
コンパイル時間 684 ms
コンパイル使用メモリ 69,140 KB
実行使用メモリ 31,032 KB
平均クエリ数 5.54
最終ジャッジ日時 2023-09-23 06:50:15
合計ジャッジ時間 4,832 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 TLE -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0