結果
| 問題 |
No.305 鍵(2)
|
| コンテスト | |
| ユーザー |
koyumeishi
|
| 提出日時 | 2015-09-21 21:22:06 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 28 ms / 2,000 ms |
| コード長 | 415 bytes |
| コンパイル時間 | 500 ms |
| コンパイル使用メモリ | 57,456 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 44.08 |
| 最終ジャッジ日時 | 2024-07-16 20:42:37 |
| 合計ジャッジ時間 | 1,797 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <iostream>
using namespace std;
int main(){
string ans(10, '0');
int last;
cout << ans << endl;
int x;
string s;
cin >> x >> s;
last = x;
for(int i=0; i<10 && last != 10; i++){
for(int j=1; j<10; j++){
ans[i] = '0' + j;
cout << ans << endl;
cin >> x >> s;
if(last < x){
last = x;
break;
}else if(last > x){
ans[i] = '0' + j-1;
break;
}
}
}
return 0;
}
koyumeishi