結果

問題 No.355 数当てゲーム(2)
ユーザー tabataba
提出日時 2016-05-11 02:43:57
言語 Python2
(2.7.18)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 6,676 KB
実行使用メモリ 24,388 KB
平均クエリ数 5.12
最終ジャッジ日時 2023-09-23 23:51:28
合計ジャッジ時間 5,187 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
23,664 KB
testcase_01 AC 48 ms
24,060 KB
testcase_02 AC 48 ms
23,532 KB
testcase_03 AC 48 ms
23,532 KB
testcase_04 AC 54 ms
23,640 KB
testcase_05 AC 49 ms
23,832 KB
testcase_06 AC 45 ms
24,336 KB
testcase_07 AC 48 ms
23,808 KB
testcase_08 AC 47 ms
23,508 KB
testcase_09 AC 49 ms
23,424 KB
testcase_10 AC 47 ms
23,412 KB
testcase_11 AC 50 ms
23,640 KB
testcase_12 AC 46 ms
24,348 KB
testcase_13 AC 48 ms
23,628 KB
testcase_14 AC 48 ms
24,216 KB
testcase_15 AC 46 ms
23,388 KB
testcase_16 AC 48 ms
23,664 KB
testcase_17 AC 46 ms
23,412 KB
testcase_18 AC 47 ms
23,436 KB
testcase_19 AC 46 ms
24,216 KB
testcase_20 AC 46 ms
24,012 KB
testcase_21 AC 48 ms
23,988 KB
testcase_22 AC 47 ms
24,036 KB
testcase_23 AC 47 ms
24,000 KB
testcase_24 AC 46 ms
24,040 KB
testcase_25 AC 49 ms
23,616 KB
testcase_26 AC 46 ms
23,992 KB
testcase_27 AC 47 ms
23,388 KB
testcase_28 AC 48 ms
23,616 KB
testcase_29 AC 47 ms
23,824 KB
testcase_30 AC 47 ms
23,428 KB
testcase_31 AC 46 ms
23,364 KB
testcase_32 AC 47 ms
23,436 KB
testcase_33 AC 47 ms
23,688 KB
testcase_34 AC 47 ms
24,324 KB
testcase_35 AC 46 ms
24,048 KB
testcase_36 AC 50 ms
24,300 KB
testcase_37 AC 50 ms
23,640 KB
testcase_38 AC 48 ms
23,808 KB
testcase_39 AC 47 ms
23,376 KB
testcase_40 AC 47 ms
24,040 KB
testcase_41 AC 48 ms
23,352 KB
testcase_42 AC 48 ms
24,348 KB
testcase_43 AC 48 ms
23,640 KB
testcase_44 AC 48 ms
23,604 KB
testcase_45 AC 50 ms
24,040 KB
testcase_46 AC 49 ms
23,352 KB
testcase_47 AC 49 ms
24,388 KB
testcase_48 AC 49 ms
23,424 KB
testcase_49 AC 50 ms
24,036 KB
testcase_50 AC 50 ms
23,392 KB
testcase_51 AC 50 ms
24,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
def request(s):
	print s[0],s[1],s[2],s[3]
	sys.stdout.flush()
	return raw_input()
k=["{0:0>4}".format(i)for i in range(10000)]
k=[i for i in k if len(set(i))==4]
def l(a,b):
	r=[0,0]
	for i in range(4):
		if a[i] in b:
			if a[i]==b[i]:
				r[0]+=1
			else:
				r[1]+=1
	return r
while 1:
	t=k.pop()
	x,y=map(int,request(t).split())
	if x==4:
		break
	k=[i for i in k if l(t,i)==[x,y]]
	#print k
0