結果
問題 | No.1237 EXP Multiple! |
ユーザー |
👑 ![]() |
提出日時 | 2020-09-25 23:37:52 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 323 bytes |
コンパイル時間 | 202 ms |
コンパイル使用メモリ | 82,460 KB |
実行使用メモリ | 104,140 KB |
最終ジャッジ日時 | 2024-06-28 08:19:21 |
合計ジャッジ時間 | 22,454 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 42 ms
52,684 KB |
testcase_01 | AC | 70 ms
90,928 KB |
testcase_02 | AC | 87 ms
104,140 KB |
testcase_03 | AC | 93 ms
99,960 KB |
testcase_04 | AC | 93 ms
100,176 KB |
testcase_05 | RE | - |
testcase_06 | AC | 71 ms
96,684 KB |
testcase_07 | RE | - |
testcase_08 | AC | 1,730 ms
102,944 KB |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | AC | 72 ms
96,660 KB |
testcase_12 | AC | 1,479 ms
102,676 KB |
testcase_13 | AC | 1,707 ms
102,720 KB |
testcase_14 | AC | 1,701 ms
103,128 KB |
testcase_15 | AC | 1,713 ms
102,916 KB |
testcase_16 | AC | 1,731 ms
102,664 KB |
testcase_17 | AC | 1,717 ms
102,940 KB |
testcase_18 | AC | 1,718 ms
102,944 KB |
testcase_19 | WA | - |
ソースコード
from sys import stdin import math import sys mod = 10**9+7 N = int(input()) A = list(map(int,stdin.readline().split())) now = 1 for i in A: if i > 10 or now > 10**9+7: print (10**9+7) sys.exit() now *= i ** math.factorial(i) ans = mod % now if now == 0: print (-1) else: print (ans)