結果
問題 |
No.1237 EXP Multiple!
|
ユーザー |
![]() |
提出日時 | 2025-10-07 20:18:21 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 307 bytes |
コンパイル時間 | 487 ms |
コンパイル使用メモリ | 82,240 KB |
実行使用メモリ | 106,464 KB |
最終ジャッジ日時 | 2025-10-07 20:18:39 |
合計ジャッジ時間 | 17,363 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 18 WA * 1 |
ソースコード
import math MOD = 10**9 + 7 N = int(input()) A = list(map(int, input().split())) ans = 1 for a in A: if a == 0: exit(print(-1)) if a >= 4: exit(print(MOD)) ans *= a**(math.factorial(a)) if ans >= MOD: exit(print(MOD)) #print(ans) ans2 = MOD % ans print(ans2)