結果
問題 |
No.1237 EXP Multiple!
|
ユーザー |
|
提出日時 | 2020-09-26 21:20:49 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 242 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 82,268 KB |
実行使用メモリ | 110,496 KB |
最終ジャッジ日時 | 2024-06-29 21:05:20 |
合計ジャッジ時間 | 4,193 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 TLE * 1 -- * 13 |
ソースコード
import math n = int(input()) a = list(map(int,input().split())) if 0 in a: print(-1) elif max(a) >= 4: print(((10)**9)+7) else: ans = 1 for i in range(n): tmp = math.factorial(a[i]) ans *= a[i]**tmp print((((10)**9)+7)%ans)