結果

問題 No.432 占い(Easy)
ユーザー YCescaYCesca
提出日時 2016-10-14 23:18:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 493 bytes
コンパイル時間 254 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 15,488 KB
最終ジャッジ日時 2024-05-02 01:08:50
合計ジャッジ時間 4,020 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,752 KB
testcase_01 AC 33 ms
10,752 KB
testcase_02 AC 31 ms
10,752 KB
testcase_03 AC 33 ms
10,752 KB
testcase_04 AC 35 ms
10,752 KB
testcase_05 AC 31 ms
10,752 KB
testcase_06 AC 32 ms
10,752 KB
testcase_07 AC 36 ms
10,752 KB
testcase_08 AC 30 ms
10,880 KB
testcase_09 AC 38 ms
10,752 KB
testcase_10 AC 36 ms
10,752 KB
testcase_11 AC 81 ms
10,752 KB
testcase_12 RE -
testcase_13 AC 504 ms
14,976 KB
testcase_14 AC 76 ms
10,752 KB
testcase_15 AC 31 ms
10,752 KB
testcase_16 AC 31 ms
10,752 KB
testcase_17 RE -
testcase_18 AC 262 ms
11,904 KB
testcase_19 AC 181 ms
11,264 KB
testcase_20 AC 97 ms
10,880 KB
testcase_21 AC 107 ms
11,136 KB
testcase_22 AC 36 ms
10,752 KB
testcase_23 AC 36 ms
10,880 KB
testcase_24 AC 37 ms
10,752 KB
testcase_25 AC 38 ms
10,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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()))))
0