結果

問題 No.305 鍵(2)
ユーザー mastersatoshimastersatoshi
提出日時 2017-06-29 08:09:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 801 bytes
コンパイル時間 120 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 24,548 KB
平均クエリ数 51.08
最終ジャッジ日時 2023-09-23 14:14:56
合計ジャッジ時間 2,273 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 38 ms
24,544 KB
testcase_02 RE -
testcase_03 AC 39 ms
24,388 KB
testcase_04 RE -
testcase_05 AC 41 ms
24,440 KB
testcase_06 AC 37 ms
24,024 KB
testcase_07 AC 39 ms
24,220 KB
testcase_08 AC 38 ms
23,920 KB
testcase_09 AC 40 ms
24,548 KB
testcase_10 RE -
testcase_11 AC 39 ms
24,520 KB
testcase_12 AC 39 ms
24,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#import pdb; pdb.set_trace()
import sys
import copy

def main():
    a = ["0","0","0","0","0","0","0","0","0","0"]
    num = ["0","1","2","3","4","5","6","7","8","9"]
    f = ["" for i in range(10)]
    now = 0
    for i in range(1, 10):
        print ("".join(a))
        (x, z) = input().split()
        if x == "10":
            sys.exit()
        now = x
        
        for j in range(10):
            if f[j] != "":
                continue
            tmpa = copy.deepcopy(a)
            tmpa[j] = num[i]
            print ("".join(tmpa))
            (x, z) = input().split()
            
            if x > now:
                a[j] = num[i]
                f[j] = num[i]
                now = x
            elif x < now:
                f[j] = a[j]
    
if __name__ == '__main__':
    main()
0