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