結果

問題 No.432 占い(Easy)
ユーザー 💕💖💞💕💖💞
提出日時 2017-01-28 15:18:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 371 bytes
コンパイル時間 109 ms
コンパイル使用メモリ 10,972 KB
実行使用メモリ 14,584 KB
最終ジャッジ日時 2023-08-25 13:12:40
合計ジャッジ時間 3,508 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,820 KB
testcase_01 AC 30 ms
9,756 KB
testcase_02 AC 26 ms
9,896 KB
testcase_03 AC 26 ms
9,900 KB
testcase_04 AC 29 ms
9,852 KB
testcase_05 AC 27 ms
9,824 KB
testcase_06 AC 26 ms
9,784 KB
testcase_07 AC 28 ms
9,860 KB
testcase_08 AC 26 ms
9,812 KB
testcase_09 AC 35 ms
10,004 KB
testcase_10 AC 31 ms
9,964 KB
testcase_11 AC 52 ms
9,840 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 51 ms
9,800 KB
testcase_15 AC 28 ms
9,940 KB
testcase_16 AC 29 ms
9,752 KB
testcase_17 RE -
testcase_18 AC 138 ms
11,056 KB
testcase_19 AC 102 ms
10,512 KB
testcase_20 AC 59 ms
10,032 KB
testcase_21 AC 66 ms
10,288 KB
testcase_22 AC 30 ms
9,796 KB
testcase_23 AC 28 ms
9,932 KB
testcase_24 AC 30 ms
10,148 KB
testcase_25 AC 29 ms
10,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import os
import math
import itertools
import typing

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