結果

問題 No.305 鍵(2)
ユーザー 👑 rin204rin204
提出日時 2022-01-20 06:55:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 514 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 86,852 KB
実行使用メモリ 91,296 KB
平均クエリ数 143.62
最終ジャッジ日時 2023-09-24 03:01:53
合計ジャッジ時間 2,493 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 95 ms
87,236 KB
testcase_01 AC 91 ms
86,832 KB
testcase_02 AC 118 ms
90,716 KB
testcase_03 AC 89 ms
87,644 KB
testcase_04 AC 95 ms
87,172 KB
testcase_05 AC 101 ms
91,296 KB
testcase_06 AC 89 ms
86,928 KB
testcase_07 AC 127 ms
91,128 KB
testcase_08 AC 89 ms
86,816 KB
testcase_09 AC 91 ms
86,880 KB
testcase_10 AC 90 ms
87,284 KB
testcase_11 AC 89 ms
87,288 KB
testcase_12 AC 92 ms
87,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = 10

for i in range(1 << n):
    print(bin(i)[2:].zfill(n), flush = True)
    x, l = input().split()
    if l[0] == "u":
        exit()
    if x == "0":
        bit = bin(i)[2:].zfill(n)
        break

lst = list(bit)
ans = [0] * n
for i in range(n):
    b = lst[i]
    for j in range(n):
        lst[i] = str(j)
        print(*lst, sep="", flush = True)
        x = input()
        if x[0] == "1":
            ans[i] = str(j)
            break
    lst[i] = b
print(*ans, sep="", flush = True)
input()
    
    
0