結果

問題 No.305 鍵(2)
ユーザー niyarinniyarin
提出日時 2016-06-01 11:36:46
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 602 bytes
コンパイル時間 221 ms
コンパイル使用メモリ 6,656 KB
実行使用メモリ 24,360 KB
平均クエリ数 44.46
最終ジャッジ日時 2023-09-23 10:44:55
合計ジャッジ時間 2,558 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 37 ms
24,000 KB
testcase_05 AC 38 ms
23,376 KB
testcase_06 AC 35 ms
23,520 KB
testcase_07 AC 37 ms
24,240 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 36 ms
23,364 KB
testcase_11 AC 38 ms
23,400 KB
testcase_12 AC 38 ms
24,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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(" ")
        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
        
0