結果

問題 No.305 鍵(2)
ユーザー rpy3cpprpy3cpp
提出日時 2016-05-29 15:22:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 579 bytes
コンパイル時間 482 ms
コンパイル使用メモリ 10,888 KB
実行使用メモリ 24,396 KB
平均クエリ数 45.23
最終ジャッジ日時 2023-09-23 10:43:15
合計ジャッジ時間 1,945 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
23,588 KB
testcase_01 AC 42 ms
23,632 KB
testcase_02 AC 39 ms
24,108 KB
testcase_03 AC 39 ms
23,700 KB
testcase_04 AC 41 ms
23,764 KB
testcase_05 AC 42 ms
23,444 KB
testcase_06 RE -
testcase_07 AC 41 ms
23,520 KB
testcase_08 AC 42 ms
24,396 KB
testcase_09 AC 41 ms
24,012 KB
testcase_10 AC 41 ms
24,396 KB
testcase_11 AC 42 ms
23,604 KB
testcase_12 AC 42 ms
23,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    answer = ''
    zeros = '0' * 10
    print(zeros)
    x, term = input().split()
    baseline = int(x)
    for pos in range(10):
        for val in range(1, 10):
            guess = '0' * pos + str(val) + '0' * (9 - pos)
            print(guess)
            x, term = input().split()
            x = int(x)
            if x == 10:
                return
            if x > baseline:
                answer = answer + str(val)
                break
            if x < baseline:
                answer = answer + '0'
                break
    print(answer)

solve()
0