結果

問題 No.432 占い(Easy)
ユーザー roiti46roiti46
提出日時 2016-10-14 22:25:06
言語 Python2
(2.7.18)
結果
AC  
実行時間 582 ms / 2,000 ms
コード長 364 bytes
コンパイル時間 569 ms
コンパイル使用メモリ 6,516 KB
実行使用メモリ 8,084 KB
最終ジャッジ日時 2023-08-14 10:55:27
合計ジャッジ時間 4,822 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
7,848 KB
testcase_01 AC 19 ms
7,872 KB
testcase_02 AC 19 ms
7,840 KB
testcase_03 AC 20 ms
7,812 KB
testcase_04 AC 24 ms
7,776 KB
testcase_05 AC 19 ms
7,728 KB
testcase_06 AC 20 ms
7,696 KB
testcase_07 AC 24 ms
7,852 KB
testcase_08 AC 21 ms
7,724 KB
testcase_09 AC 21 ms
7,728 KB
testcase_10 AC 26 ms
7,884 KB
testcase_11 AC 77 ms
7,752 KB
testcase_12 AC 581 ms
7,892 KB
testcase_13 AC 582 ms
8,052 KB
testcase_14 AC 77 ms
7,880 KB
testcase_15 AC 21 ms
7,720 KB
testcase_16 AC 20 ms
7,692 KB
testcase_17 AC 545 ms
8,084 KB
testcase_18 AC 297 ms
7,876 KB
testcase_19 AC 203 ms
7,760 KB
testcase_20 AC 100 ms
7,880 KB
testcase_21 AC 116 ms
7,896 KB
testcase_22 AC 25 ms
7,744 KB
testcase_23 AC 22 ms
7,940 KB
testcase_24 AC 20 ms
7,724 KB
testcase_25 AC 21 ms
7,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

T = int(raw_input())
for loop in xrange(T):
    S = raw_input()
    while len(S) > 1:
        U = ""
        for i, j in zip(S, S[1:]):
            x = int(i) + int(j)
            if x > 9: x = x/10 + x%10
            U += str(x)
        S = U
    print S
0