結果
問題 |
No.1237 EXP Multiple!
|
ユーザー |
|
提出日時 | 2022-02-06 00:12:26 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 256 bytes |
コンパイル時間 | 353 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 264,108 KB |
最終ジャッジ日時 | 2024-06-11 13:41:41 |
合計ジャッジ時間 | 4,601 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 5 TLE * 1 -- * 13 |
ソースコード
n = int(input()) A = list(map(int, input().split())) mod = 10**9 + 7 if min(A) == 0: print(-1) elif max(A) >= 4: print(mod) else: ans = 1 Fact = [1, 1, 2, 6] for i in range(n): ans *= pow(A[i], Fact[A[i]]) print(mod % ans)