結果
| 問題 | No.933 おまわりさんこいつです |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-01-07 23:34:36 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 391 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 22,140 KB |
| 最終ジャッジ日時 | 2026-09-28 10:26:53 |
| 合計ジャッジ時間 | 3,730 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 12 RE * 5 |
ソースコード
# 2020/01/07
# 解説カンニング
# 数字根の性質を利用する
# n==0のとき => 0
# n%9==0のとき => 9
# else => n%9
n=int(input())
p=list(map(int,input().split()))
cnt=1
for e in p:
tmp=e%9
if tmp:
cnt*=tmp
else:
if e:
cnt*=9
else:
print(0)
exit()
ans=0
for e in str(cnt):
ans+=int(e)
print(ans)