結果
| 問題 | No.1237 EXP Multiple! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-25 21:38:20 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 322 bytes |
| 記録 | |
| コンパイル時間 | 488 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 36,288 KB |
| 最終ジャッジ日時 | 2026-03-16 17:34:39 |
| 合計ジャッジ時間 | 4,074 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 14 WA * 5 |
ソースコード
from math import factorial
n = int(input())
a = list(map(int, input().split()))
a.sort()
if 0 in a:
exit(print(0))
ans = 1
for i in range(n):
if a[i] >= 18:
exit(print(10 ** 9 + 7))
ans *= pow(a[i], factorial(a[i]))
if ans >= 10 ** 9 + 7:
exit(print(10 ** 9 + 7))
print((10 ** 9 + 7) % ans)