結果

問題 No.305 鍵(2)
ユーザー tookunn_1213tookunn_1213
提出日時 2015-11-27 23:55:06
言語 Python2
(2.7.18)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 137 ms
コンパイル使用メモリ 6,672 KB
実行使用メモリ 24,216 KB
平均クエリ数 52.15
最終ジャッジ日時 2023-09-23 22:07:00
合計ジャッジ時間 1,542 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
23,328 KB
testcase_01 AC 36 ms
23,544 KB
testcase_02 AC 35 ms
24,216 KB
testcase_03 AC 35 ms
23,328 KB
testcase_04 AC 37 ms
23,328 KB
testcase_05 AC 38 ms
23,532 KB
testcase_06 AC 36 ms
23,508 KB
testcase_07 AC 37 ms
23,628 KB
testcase_08 AC 37 ms
23,916 KB
testcase_09 AC 37 ms
23,724 KB
testcase_10 AC 36 ms
23,736 KB
testcase_11 AC 36 ms
24,024 KB
testcase_12 AC 37 ms
23,904 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
preX = 0
ans = [0 for i in range(10)]
sys.stdout.write(''.join(str(j) for j in ans) + '\n')
sys.stdout.flush()
a,b = raw_input().split()
a = int(a)
if a != 10:
	preX = a
	it = 0
	ans[it] += 1
	while True:
		sys.stdout.write(''.join(str(j) for j in ans) + '\n')
		sys.stdout.flush()
		x,res = raw_input().split()
		if int(x) == 10:
			break
		else:
			if int(x) > preX:
				it += 1
				preX = int(x)
			elif int(x) < preX:
				ans[it] -= 1
				it += 1
			else:
				ans[it] += 1
0