結果
問題 |
No.1237 EXP Multiple!
|
ユーザー |
![]() |
提出日時 | 2023-02-15 15:19:31 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 266 bytes |
コンパイル時間 | 287 ms |
コンパイル使用メモリ | 82,352 KB |
実行使用メモリ | 110,720 KB |
最終ジャッジ日時 | 2024-07-18 00:35:42 |
合計ジャッジ時間 | 4,903 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 TLE * 1 -- * 13 |
ソースコード
from math import factorial N = int(input()) A = list(map(int, input().split())) A.sort() if 0 in A: ans = -1 elif max(A) >= 4: ans = 10**9+7 else: product = 1 for a in A: product *= pow(a, factorial(a)) ans = (10**9+7)%product print(ans)