結果

問題 No.432 占い(Easy)
ユーザー 💕💖💞
提出日時 2017-01-28 15:18:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 371 bytes
コンパイル時間 113 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 16,256 KB
最終ジャッジ日時 2024-12-23 21:05:20
合計ジャッジ時間 3,090 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20 RE * 2
権限があれば一括ダウンロードができます

ソースコード

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