結果

問題 No.305 鍵(2)
ユーザー kurenaifkurenaif
提出日時 2016-05-31 18:18:50
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 526 bytes
コンパイル時間 432 ms
コンパイル使用メモリ 53,080 KB
実行使用メモリ 24,408 KB
平均クエリ数 21.62
最終ジャッジ日時 2023-09-23 10:44:13
合計ジャッジ時間 3,310 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <cstdio>

using namespace std;

int get() {
	int num; cin >> num;
	string str; cin >> str;
	return num;
}

int main(void) {
	string str = "0000000000";
	cout << str << endl;
	int num = get();
	if (num == 10) return 0;

	for (int i = 0; i < 10; ++i) {
		for (int j = 0; j < 9; ++j) {
			str[i]++;
			cout << str << endl;
			int n = get();
			if (n == 10) return 0;
			if (n < num) {
				str[i]--;
				break;
			}
			if (n > num) {
				n = num;
				break;
			}
		}
	}

	return 0;
}
0