結果

問題 No.434 占い
ユーザー kamomekamome
提出日時 2019-07-09 15:28:35
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 432 bytes
コンパイル時間 127 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 816,932 KB
最終ジャッジ日時 2023-08-02 10:00:41
合計ジャッジ時間 4,177 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,848 KB
testcase_01 WA -
testcase_02 AC 16 ms
7,788 KB
testcase_03 AC 17 ms
7,824 KB
testcase_04 AC 17 ms
8,300 KB
testcase_05 AC 16 ms
7,968 KB
testcase_06 WA -
testcase_07 AC 17 ms
7,868 KB
testcase_08 MLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python3

def regress(list_of_int):
    if len(list_of_int)==1:
        if list_of_int[0]%9==0:
            return 9
        else:
            return list_of_int[0]%9
    new_list=[]
    for i in range(len(list_of_int)-1):
        new_list.append(list_of_int[i]+list_of_int[i+1])
    return regress(new_list)


N=int(input())


for _i in range(N):
    in_num_list=[int(n) for n in input()]
    print(regress(in_num_list))
0