結果

問題 No.432 占い(Easy)
ユーザー gorugo30gorugo30
提出日時 2021-02-23 21:32:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 98 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 1,224 ms
コンパイル使用メモリ 81,504 KB
実行使用メモリ 75,640 KB
最終ジャッジ日時 2023-10-23 22:28:17
合計ジャッジ時間 3,957 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,340 KB
testcase_01 AC 34 ms
53,340 KB
testcase_02 AC 34 ms
53,340 KB
testcase_03 AC 35 ms
53,340 KB
testcase_04 AC 51 ms
64,152 KB
testcase_05 AC 36 ms
53,340 KB
testcase_06 AC 35 ms
53,340 KB
testcase_07 AC 50 ms
64,152 KB
testcase_08 AC 36 ms
53,340 KB
testcase_09 AC 55 ms
63,684 KB
testcase_10 AC 55 ms
66,300 KB
testcase_11 AC 70 ms
75,500 KB
testcase_12 AC 96 ms
75,416 KB
testcase_13 AC 98 ms
75,424 KB
testcase_14 AC 76 ms
75,504 KB
testcase_15 AC 37 ms
53,340 KB
testcase_16 AC 37 ms
53,340 KB
testcase_17 AC 78 ms
75,276 KB
testcase_18 AC 90 ms
75,640 KB
testcase_19 AC 82 ms
75,640 KB
testcase_20 AC 75 ms
75,496 KB
testcase_21 AC 72 ms
75,480 KB
testcase_22 AC 58 ms
66,300 KB
testcase_23 AC 54 ms
64,068 KB
testcase_24 AC 56 ms
63,684 KB
testcase_25 AC 56 ms
63,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def comp(x, y):
    x += y
    x = str(x)
    if len(x) > 1:
        return comp(int(x[0]), int(x[1]))
    return x
T = int(input())
for aiueo in range(T):
    S = input()
    while len(S) > 1:
        T = ""
        for i in range(len(S) - 1):
            T += comp(int(S[i]), int(S[i + 1]))
        S = T
    print(S)
0