結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
25,376 KB
testcase_01 AC 56 ms
25,164 KB
testcase_02 AC 59 ms
25,256 KB
testcase_03 AC 64 ms
25,552 KB
testcase_04 AC 64 ms
25,596 KB
testcase_05 AC 65 ms
25,284 KB
testcase_06 AC 56 ms
25,296 KB
testcase_07 AC 63 ms
25,192 KB
testcase_08 AC 56 ms
24,976 KB
testcase_09 RE -
testcase_10 AC 66 ms
25,080 KB
testcase_11 AC 55 ms
25,648 KB
testcase_12 AC 61 ms
25,488 KB
testcase_13 RE -
testcase_14 AC 58 ms
25,056 KB
testcase_15 AC 56 ms
25,396 KB
testcase_16 AC 58 ms
25,700 KB
testcase_17 AC 61 ms
25,352 KB
testcase_18 RE -
testcase_19 AC 63 ms
25,308 KB
testcase_20 AC 59 ms
25,220 KB
testcase_21 AC 62 ms
25,068 KB
testcase_22 AC 57 ms
25,556 KB
testcase_23 RE -
testcase_24 AC 63 ms
25,696 KB
testcase_25 AC 58 ms
25,232 KB
testcase_26 AC 57 ms
25,712 KB
testcase_27 AC 63 ms
25,384 KB
testcase_28 AC 59 ms
25,040 KB
testcase_29 AC 55 ms
25,340 KB
testcase_30 AC 57 ms
25,280 KB
testcase_31 AC 61 ms
25,336 KB
testcase_32 AC 62 ms
25,632 KB
testcase_33 AC 56 ms
25,660 KB
testcase_34 AC 69 ms
25,292 KB
testcase_35 AC 62 ms
25,036 KB
testcase_36 AC 66 ms
25,356 KB
testcase_37 AC 67 ms
25,072 KB
testcase_38 AC 74 ms
25,428 KB
testcase_39 AC 58 ms
25,080 KB
testcase_40 AC 62 ms
25,040 KB
testcase_41 AC 63 ms
25,512 KB
testcase_42 AC 58 ms
25,316 KB
testcase_43 AC 59 ms
25,024 KB
testcase_44 RE -
testcase_45 AC 64 ms
25,632 KB
testcase_46 AC 60 ms
25,048 KB
testcase_47 AC 55 ms
25,372 KB
testcase_48 RE -
testcase_49 AC 55 ms
24,976 KB
testcase_50 AC 55 ms
25,272 KB
testcase_51 AC 58 ms
25,340 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