結果

問題 No.432 占い(Easy)
ユーザー iad_2889iad_2889
提出日時 2019-05-20 02:27:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 202 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 11,860 KB
実行使用メモリ 10,136 KB
最終ジャッジ日時 2023-10-17 08:04:20
合計ジャッジ時間 3,630 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,064 KB
testcase_01 AC 28 ms
10,064 KB
testcase_02 AC 29 ms
10,064 KB
testcase_03 AC 29 ms
10,064 KB
testcase_04 AC 31 ms
10,064 KB
testcase_05 AC 27 ms
10,064 KB
testcase_06 AC 27 ms
10,068 KB
testcase_07 AC 28 ms
10,064 KB
testcase_08 AC 27 ms
10,064 KB
testcase_09 AC 29 ms
10,136 KB
testcase_10 AC 30 ms
10,068 KB
testcase_11 AC 45 ms
10,064 KB
testcase_12 AC 199 ms
10,100 KB
testcase_13 AC 202 ms
10,100 KB
testcase_14 AC 44 ms
10,064 KB
testcase_15 AC 28 ms
10,064 KB
testcase_16 AC 28 ms
10,064 KB
testcase_17 AC 155 ms
10,100 KB
testcase_18 AC 113 ms
10,096 KB
testcase_19 AC 85 ms
10,072 KB
testcase_20 AC 51 ms
10,064 KB
testcase_21 AC 55 ms
10,072 KB
testcase_22 AC 30 ms
10,072 KB
testcase_23 AC 29 ms
10,088 KB
testcase_24 AC 29 ms
10,136 KB
testcase_25 AC 29 ms
10,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
fortunes = ([int(x) for x in input()] for y in range(N))
results = []
for fo in fortunes:
    lst = fo
    while len(lst) != 1:
        tmp = []
        for idx in range(len(lst) - 1):
            num = lst[idx] + lst[idx + 1]
            if num >= 10:
                num = num // 10 + num % 10
            tmp.append(num)
        lst = tmp
    results.append(lst[0])
print("\n".join(map(str,results)))
0