結果

問題 No.305 鍵(2)
ユーザー koyumeishikoyumeishi
提出日時 2015-09-21 21:22:06
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 31 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 602 ms
コンパイル使用メモリ 52,140 KB
実行使用メモリ 24,396 KB
平均クエリ数 44.08
最終ジャッジ日時 2023-09-23 20:51:44
合計ジャッジ時間 1,911 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
24,060 KB
testcase_01 AC 27 ms
23,436 KB
testcase_02 AC 26 ms
24,396 KB
testcase_03 AC 27 ms
23,892 KB
testcase_04 AC 26 ms
23,880 KB
testcase_05 AC 29 ms
24,084 KB
testcase_06 AC 25 ms
24,312 KB
testcase_07 AC 28 ms
24,360 KB
testcase_08 AC 28 ms
23,580 KB
testcase_09 AC 28 ms
23,724 KB
testcase_10 AC 27 ms
24,336 KB
testcase_11 AC 29 ms
24,348 KB
testcase_12 AC 28 ms
23,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

}
0