結果
問題 | No.355 数当てゲーム(2) |
ユーザー |
![]() |
提出日時 | 2016-05-11 02:43:57 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 51 ms / 2,000 ms |
コード長 | 407 bytes |
コンパイル時間 | 72 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 25,232 KB |
平均クエリ数 | 5.12 |
最終ジャッジ日時 | 2024-07-16 23:41:54 |
合計ジャッジ時間 | 5,590 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 52 |
ソースコード
import sysdef 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]+=1else:r[1]+=1return rwhile 1:t=k.pop()x,y=map(int,request(t).split())if x==4:breakk=[i for i in k if l(t,i)==[x,y]]#print k