結果
問題 |
No.305 鍵(2)
|
ユーザー |
|
提出日時 | 2016-06-01 11:55:17 |
言語 | Python2 (2.7.18) |
結果 |
AC
|
実行時間 | 38 ms / 2,000 ms |
コード長 | 655 bytes |
コンパイル時間 | 200 ms |
コンパイル使用メモリ | 7,040 KB |
実行使用メモリ | 25,232 KB |
平均クエリ数 | 44.00 |
最終ジャッジ日時 | 2024-07-16 23:53:01 |
合計ジャッジ時間 | 2,108 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
import sys l = list("0000000000") while True: print "".join(l) sys.stdout.flush() x,state = raw_input().split(" ") x = int(x) if (state == "unlocked"): break new_l = [] for i in range(10): _l = [] + l _l[i] = str((int(l[i]) + 1 ) % 10) print "".join(_l) sys.stdout.flush() y,state = raw_input().split(" ") if (state == "unlocked"): exit() y = int(y) if (x == y ): new_l.append(str((int(_l[i]) + 1 ) % 10 )) elif (x < y ): new_l.append(_l[i]) else: new_l.append(l[i]) l = new_l