結果

問題 No.432 占い(Easy)
ユーザー 💕💖💞💕💖💞
提出日時 2017-01-28 15:22:20
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 251 ms / 2,000 ms
コード長 410 bytes
コンパイル時間 472 ms
コンパイル使用メモリ 10,892 KB
実行使用メモリ 14,380 KB
最終ジャッジ日時 2023-08-25 13:13:04
合計ジャッジ時間 3,053 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,800 KB
testcase_01 AC 25 ms
9,828 KB
testcase_02 AC 26 ms
9,832 KB
testcase_03 AC 26 ms
9,796 KB
testcase_04 AC 28 ms
9,816 KB
testcase_05 AC 26 ms
9,852 KB
testcase_06 AC 26 ms
9,780 KB
testcase_07 AC 28 ms
9,884 KB
testcase_08 AC 26 ms
9,848 KB
testcase_09 AC 30 ms
9,952 KB
testcase_10 AC 31 ms
9,868 KB
testcase_11 AC 51 ms
10,020 KB
testcase_12 AC 248 ms
14,324 KB
testcase_13 AC 251 ms
14,380 KB
testcase_14 AC 48 ms
9,824 KB
testcase_15 AC 26 ms
9,768 KB
testcase_16 AC 26 ms
9,852 KB
testcase_17 AC 183 ms
14,292 KB
testcase_18 AC 143 ms
11,028 KB
testcase_19 AC 100 ms
10,408 KB
testcase_20 AC 59 ms
9,968 KB
testcase_21 AC 66 ms
10,336 KB
testcase_22 AC 30 ms
9,884 KB
testcase_23 AC 32 ms
9,868 KB
testcase_24 AC 32 ms
9,996 KB
testcase_25 AC 31 ms
9,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import os
import math
import itertools
import typing
import sys
sys.setrecursionlimit(10000)
T = int(input())
S = [list(map(int, list(input()))) for _ in range(T)]
for s in S:
  def rec(s: list) -> None:
    if len(s) == 1:
        print(s.pop())
        return
    arr = [int(s) if len(s) == 1 else int(s[1]) + int(s[0]) for s in [str(p[0] + p[1]) for p in list(zip(s, s[1:]))]]
    return rec( arr )
  rec(s)
0