結果

問題 No.933 おまわりさんこいつです
ユーザー tobusakana
提出日時 2020-08-26 01:12:18
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 21,704 KB
最終ジャッジ日時 2024-11-06 11:55:50
合計ジャッジ時間 2,024 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline

N = int(readline())
P = list(map(int,readline().split()))

if 0 in P:
  print(0)
  exit(0)
  
P = list(map(lambda x:9 if x % 9 == 0 else x % 9, P))

from functools import reduce

r = reduce(lambda a,b:9 if (a * b) % 9 == 0 else (a * b) % 9, P)

print(r)
0