結果
問題 |
No.1237 EXP Multiple!
|
ユーザー |
|
提出日時 | 2020-09-25 21:34:33 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 274 bytes |
コンパイル時間 | 739 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 116,564 KB |
最終ジャッジ日時 | 2024-06-28 06:11:40 |
合計ジャッジ時間 | 3,814 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | TLE * 1 -- * 18 |
ソースコード
import math n = int(input()) a = list(map(int,input().split())) ans = 1 #b = 1 for i in range(n): tmp1 = math.factorial(a[i]) tmp2 = (a[i]**tmp1) ans = tmp2*ans #b *= (a[i]**(math.factorial(a[i]))) #print(b) if ans > 0: print(((10**9)+7)%ans) else: print(-1)