結果
問題 | No.1237 EXP Multiple! |
ユーザー |
![]() |
提出日時 | 2020-09-28 04:13:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,733 ms / 2,000 ms |
コード長 | 313 bytes |
コンパイル時間 | 196 ms |
コンパイル使用メモリ | 82,384 KB |
実行使用メモリ | 107,492 KB |
最終ジャッジ日時 | 2024-07-01 00:32:51 |
合計ジャッジ時間 | 14,764 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 19 |
ソースコード
n = int(input())A = list(map(int, input().split()))import mathA.sort()if A[0] == 0:print(-1)elif max(A) >= 4:print(10**9+7)else:t = 1for a in A:t *= a**math.factorial(a)if t >= 10**9+7:print(10**9+7)exit()else:print((10**9+7)%t)