結果

問題 No.1237 EXP Multiple!
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-09-25 21:38:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 1,576 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 30,860 KB
最終ジャッジ日時 2023-09-10 15:02:07
合計ジャッジ時間 3,493 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,980 KB
testcase_01 AC 97 ms
23,832 KB
testcase_02 AC 128 ms
29,340 KB
testcase_03 AC 127 ms
30,340 KB
testcase_04 AC 79 ms
30,860 KB
testcase_05 WA -
testcase_06 AC 52 ms
12,192 KB
testcase_07 WA -
testcase_08 AC 135 ms
12,312 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 52 ms
12,316 KB
testcase_12 AC 134 ms
12,240 KB
testcase_13 AC 138 ms
12,248 KB
testcase_14 AC 133 ms
12,356 KB
testcase_15 AC 133 ms
12,372 KB
testcase_16 AC 132 ms
12,292 KB
testcase_17 AC 130 ms
12,176 KB
testcase_18 AC 136 ms
12,172 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0