結果

問題 No.432 占い(Easy)
ユーザー turner18_jpturner18_jp
提出日時 2018-03-16 04:53:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 409 bytes
コンパイル時間 70 ms
コンパイル使用メモリ 10,920 KB
実行使用メモリ 8,212 KB
最終ジャッジ日時 2023-08-23 11:35:49
合計ジャッジ時間 4,967 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 15 ms
7,868 KB
testcase_02 AC 16 ms
7,864 KB
testcase_03 WA -
testcase_04 AC 25 ms
7,764 KB
testcase_05 WA -
testcase_06 AC 15 ms
7,864 KB
testcase_07 AC 22 ms
7,912 KB
testcase_08 WA -
testcase_09 AC 18 ms
7,716 KB
testcase_10 WA -
testcase_11 AC 96 ms
7,804 KB
testcase_12 AC 838 ms
8,212 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 451 ms
8,036 KB
testcase_18 AC 411 ms
7,796 KB
testcase_19 AC 272 ms
7,768 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 17 ms
7,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ans = []
for i in range(n):
  s = list(input())
  while True:
    if len(s) == 1:
      ans.append(s[0])
      break
    temp = []
    for i in range(len(s)-1):
      if int(s[i]) + int(s[i+1]) > 10:
        temp.append(int(str(int(s[i]) + int(s[i+1]))[0]) + int(str(int(s[i]) + int(s[i+1]))[1]))
      else:
        temp.append(int(s[i]) + int(s[i+1]))
    s = temp

for i in ans:
  print(i)
0