結果

問題 No.305 鍵(2)
ユーザー tjaketjake
提出日時 2015-12-04 01:22:00
言語 Python2
(2.7.18)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 362 bytes
コンパイル時間 48 ms
コンパイル使用メモリ 6,496 KB
実行使用メモリ 36,348 KB
最終ジャッジ日時 2023-09-23 22:15:10
合計ジャッジ時間 6,679 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin, stdout
def check(code):
    stdout.writelines(''.join(map(str, code)))
    stdout.flush()
    s = stdin.readline().split()
    if s[1][0]=='u': exit(0)
    return int(s[0])
pw = [0]*10
f = check(pw)
i = 0
while 1:
    r = pw[i]
    pw[i] = (r+1)%10
    fn = check(pw)
    if f>fn:
        pw[i] = r
        i += 1
    else:
        f = fn
0