結果

問題 No.434 占い
ユーザー kamome
提出日時 2019-07-09 15:34:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
MLE  
実行時間 -
コード長 517 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 817,920 KB
最終ジャッジ日時 2024-10-12 05:22:48
合計ジャッジ時間 3,470 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 4 MLE * 1 -- * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python3

def regress(list_of_int):
    if len(list_of_int)==1:
        if list_of_int[0]%9==0:
            if not list_of_int[0]==0:
                return 9
            else:
                return 0
        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