結果

問題 No.305 鍵(2)
ユーザー tktk_snsntktk_snsn
提出日時 2021-04-22 23:54:46
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 38 ms / 2,000 ms
コード長 666 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,956 KB
実行使用メモリ 24,416 KB
平均クエリ数 32.15
最終ジャッジ日時 2023-09-24 02:56:52
合計ジャッジ時間 1,689 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
23,968 KB
testcase_01 AC 34 ms
23,872 KB
testcase_02 AC 33 ms
24,248 KB
testcase_03 AC 33 ms
23,724 KB
testcase_04 AC 34 ms
23,916 KB
testcase_05 AC 33 ms
24,120 KB
testcase_06 AC 31 ms
23,852 KB
testcase_07 AC 34 ms
24,396 KB
testcase_08 AC 33 ms
23,724 KB
testcase_09 AC 36 ms
24,088 KB
testcase_10 AC 34 ms
23,872 KB
testcase_11 AC 34 ms
24,416 KB
testcase_12 AC 34 ms
24,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def read():
    x, txt = input().split()
    return int(x)


match = 0
ok = [-1] * 10
for i in range(10):
    tmp = [i if x == -1 else x for x in ok]
    print(*tmp, sep="")
    cnt = read()
    if cnt == 10:
        exit()

    found = cnt - match
    if not found:
        continue
    for j in range(10):
        if tmp[j] == i:
            tmp[j] = (i + 1) % 10
            print(*tmp, sep="")
            c = read()
            if c == 10:
                exit()
            if c - match == found + 1:
                ok[j] = tmp[j]
            if c - match == found - 1:
                ok[j] = i
            tmp[j] = i
    match += found

print(*ok, sep="\n")
0