結果

問題 No.305 鍵(2)
ユーザー fmhrfmhr
提出日時 2015-11-28 00:37:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 45 ms / 2,000 ms
コード長 652 bytes
コンパイル時間 426 ms
コンパイル使用メモリ 10,732 KB
実行使用メモリ 24,984 KB
平均クエリ数 43.85
最終ジャッジ日時 2023-09-23 22:07:25
合計ジャッジ時間 1,658 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
24,368 KB
testcase_01 AC 43 ms
24,780 KB
testcase_02 AC 41 ms
24,720 KB
testcase_03 AC 44 ms
24,704 KB
testcase_04 AC 44 ms
24,524 KB
testcase_05 AC 45 ms
24,568 KB
testcase_06 AC 43 ms
24,876 KB
testcase_07 AC 43 ms
24,532 KB
testcase_08 AC 45 ms
24,984 KB
testcase_09 AC 43 ms
24,928 KB
testcase_10 AC 44 ms
24,596 KB
testcase_11 AC 44 ms
24,504 KB
testcase_12 AC 44 ms
24,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding:utf-8

def main():
    import random
    a = str(random.randint(0,9999999999)).zfill(10)
    # a = '1234567890'
    print(a)
    score, s = input().split()
    if s == 'unlocked':
        return
    for i in range(10):
        for j in range(10):
            if a[i] == str(j):
                continue
            print(a[:i]+str(j)+a[i+1:])
            score2, s = input().split()
            if s == 'unlocked':
                return
            if int(score) < int(score2):
                a = a[:i]+str(j)+a[i+1:]
                score = score2
                break
            if int(score) > int(score2):
                break

main()
0