結果
| 問題 | 
                            No.432 占い(Easy)
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2016-10-14 23:18:07 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 493 bytes | 
| コンパイル時間 | 232 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 15,488 KB | 
| 最終ジャッジ日時 | 2024-11-22 10:17:42 | 
| 合計ジャッジ時間 | 3,920 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 20 RE * 2 | 
ソースコード
t = int(input())
def tasu(x):
    #x = stc[0]
    tstc =[]
    if len(x) == 1:
        return x[0]
    else:    
        for i2 in range(len(x)-1):
            val = x[i2] + x[i2+1]
            tstc.append(sum(map(int,list(str(val)))))
            #print(stc2) return を書くことでこの繰り返しも表示される ただreturn 何もないとNone になる
        else:
            x1 = tstc
    return tasu(x1)
stc = []
for i in range(t):
    print(tasu(list(map(int,input()))))