結果
| 問題 | No.1237 EXP Multiple! |
| コンテスト | |
| ユーザー |
FromBooska
|
| 提出日時 | 2023-02-15 15:22:30 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 1,166 ms / 2,000 ms |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 135 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 208,768 KB |
| 最終ジャッジ日時 | 2026-04-01 15:51:38 |
| 合計ジャッジ時間 | 9,962 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 19 |
ソースコード
from math import factorial
from collections import Counter
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))
if product > 10**9+7:
print(10**9+7)
exit()
ans = (10**9+7)%product
print(ans)
FromBooska