結果
| 問題 | No.434 占い |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-09 15:34:06 |
| 言語 | Python3 (3.14.2 + numpy 2.4.0 + scipy 1.16.3) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 517 bytes |
| 記録 | |
| コンパイル時間 | 95 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 817,920 KB |
| 最終ジャッジ日時 | 2024-10-12 05:22:48 |
| 合計ジャッジ時間 | 3,470 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 MLE * 1 -- * 22 |
ソースコード
#!/usr/bin/python3
def regress(list_of_int):
if len(list_of_int)==1:
if list_of_int[0]%9==0:
if not list_of_int[0]==0:
return 9
else:
return 0
else:
return list_of_int[0]%9
new_list=[]
for i in range(len(list_of_int)-1):
new_list.append(list_of_int[i]+list_of_int[i+1])
return regress(new_list)
N=int(input())
for _i in range(N):
in_num_list=[int(n) for n in input()]
print(regress(in_num_list))