結果

問題 No.355 数当てゲーム(2)
ユーザー tabataba
提出日時 2016-04-14 18:24:05
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 588 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 6,692 KB
実行使用メモリ 25,864 KB
平均クエリ数 43.37
最終ジャッジ日時 2023-09-23 10:22:46
合計ジャッジ時間 7,083 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
25,212 KB
testcase_01 AC 58 ms
25,224 KB
testcase_02 AC 54 ms
25,308 KB
testcase_03 RE -
testcase_04 AC 59 ms
25,040 KB
testcase_05 AC 59 ms
25,408 KB
testcase_06 AC 66 ms
25,604 KB
testcase_07 AC 56 ms
25,216 KB
testcase_08 AC 61 ms
25,128 KB
testcase_09 AC 64 ms
25,000 KB
testcase_10 AC 63 ms
25,676 KB
testcase_11 AC 56 ms
25,472 KB
testcase_12 AC 57 ms
25,324 KB
testcase_13 AC 59 ms
25,028 KB
testcase_14 AC 58 ms
25,696 KB
testcase_15 AC 76 ms
25,864 KB
testcase_16 AC 55 ms
25,352 KB
testcase_17 AC 60 ms
25,472 KB
testcase_18 AC 63 ms
25,192 KB
testcase_19 AC 57 ms
25,356 KB
testcase_20 AC 56 ms
25,632 KB
testcase_21 AC 55 ms
25,192 KB
testcase_22 AC 64 ms
25,092 KB
testcase_23 AC 56 ms
25,360 KB
testcase_24 RE -
testcase_25 AC 63 ms
25,220 KB
testcase_26 AC 58 ms
25,652 KB
testcase_27 AC 55 ms
25,532 KB
testcase_28 AC 55 ms
24,952 KB
testcase_29 AC 66 ms
25,372 KB
testcase_30 AC 59 ms
25,340 KB
testcase_31 AC 57 ms
24,928 KB
testcase_32 AC 55 ms
25,472 KB
testcase_33 AC 60 ms
25,564 KB
testcase_34 RE -
testcase_35 AC 56 ms
25,428 KB
testcase_36 AC 62 ms
25,164 KB
testcase_37 AC 55 ms
25,428 KB
testcase_38 AC 58 ms
25,008 KB
testcase_39 AC 56 ms
24,892 KB
testcase_40 AC 55 ms
25,608 KB
testcase_41 AC 67 ms
25,228 KB
testcase_42 AC 57 ms
25,016 KB
testcase_43 AC 65 ms
25,124 KB
testcase_44 AC 58 ms
25,428 KB
testcase_45 RE -
testcase_46 AC 59 ms
25,652 KB
testcase_47 AC 58 ms
25,256 KB
testcase_48 AC 54 ms
25,608 KB
testcase_49 AC 53 ms
25,024 KB
testcase_50 AC 57 ms
25,392 KB
testcase_51 AC 51 ms
25,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import random
k=sorted([i for i in["{0:0>4}".format(i)for i in range(10000)]if len(set(i))==4],key=lambda x:random.random())
for _ in range(5040):
	print k[0][0],k[0][1],k[0][2],k[0][3]
	sys.stdout.flush()
	s=raw_input()
	if s=="4 0":
		break
	elif s=="0 0":
		k=[i for i in k if not(i[0]in k[0]or i[1]in k[0]or i[2]in k[0]or i[3]in k[0])]
	elif s=="0 4":
		k=[i for i in k if i[0]in k[0]and i[1]in k[0]and i[2]in k[0]and i[3]in k[0]]
		k.pop(0)
	else:
		k=[i for i in k if i[0]in k[0]or i[1]in k[0]or i[2]in k[0]or i[3]in k[0]]
		k.pop(0)
	#print len(k)
	if len(k)==0:
		break
0