結果

問題 No.305 鍵(2)
コンテスト
ユーザー GrayCoder
提出日時 2018-06-30 03:51:44
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 113 ms / 2,000 ms
コード長 493 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 357 ms
コンパイル使用メモリ 20,824 KB
実行使用メモリ 34,572 KB
平均クエリ数 86.69
最終ジャッジ日時 2026-03-31 16:24:44
合計ジャッジ時間 2,762 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

from sys import stdin, stdout
input = lambda: stdin.readline().rstrip()
write = stdout.write

def main():
    num = ['0'] * 10 + ['\n']
    for i in range(10):
        verifi = []
        for j in range(10):
            num[i] = str(j)
            write(''.join(num))
            stdout.flush()
            x, lock = input().split()
            x = int(x)
            if lock == 'unlocked':
                return
            verifi.append((x, j))
        num[i] = str(max(verifi)[1])

main()
0