結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
zaichu
|
| 提出日時 | 2015-12-31 01:16:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 469 bytes |
| コンパイル時間 | 1,310 ms |
| コンパイル使用メモリ | 159,100 KB |
| 実行使用メモリ | 25,264 KB |
| 平均クエリ数 | 43.54 |
| 最終ジャッジ日時 | 2024-07-16 22:49:22 |
| 合計ジャッジ時間 | 2,705 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
string str;
int count = 0;
int tmp = 0;
long long int check = 0;
long long int plus = 1;
bool flag = true;
while(tmp != 10){
printf("%010lld\n",check);
cin >> tmp >> str;
if(flag){
count = tmp;
flag = false;
}
if(str == "unlocked") return 0;
if(count > tmp){
check -= plus;
plus *= 10;
}else if(count < tmp){
count = tmp;
plus *= 10;
}
check += plus;
}
return 0;
}
zaichu