結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,752 KB
testcase_01 AC 33 ms
10,752 KB
testcase_02 AC 32 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 34 ms
10,752 KB
testcase_05 AC 29 ms
10,752 KB
testcase_06 AC 30 ms
10,752 KB
testcase_07 AC 34 ms
10,752 KB
testcase_08 AC 30 ms
10,752 KB
testcase_09 AC 33 ms
10,880 KB
testcase_10 AC 34 ms
10,752 KB
testcase_11 AC 76 ms
10,752 KB
testcase_12 RE -
testcase_13 AC 501 ms
14,976 KB
testcase_14 AC 75 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 261 ms
11,904 KB
testcase_19 AC 180 ms
11,264 KB
testcase_20 AC 99 ms
10,880 KB
testcase_21 AC 108 ms
11,008 KB
testcase_22 AC 36 ms
10,752 KB
testcase_23 AC 35 ms
10,752 KB
testcase_24 AC 34 ms
10,880 KB
testcase_25 AC 35 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
stc = []
for i in range(t):
    stc.append(list(map(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)
for i3 in stc:
    print(tasu(i3))
0