結果

問題 No.1237 EXP Multiple!
ユーザー O2MTO2MT
提出日時 2020-09-30 00:49:03
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 257 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 86,868 KB
実行使用メモリ 110,336 KB
最終ジャッジ日時 2023-09-18 03:31:23
合計ジャッジ時間 5,158 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,036 KB
testcase_01 AC 133 ms
99,392 KB
testcase_02 AC 160 ms
100,872 KB
testcase_03 AC 160 ms
100,828 KB
testcase_04 AC 128 ms
99,208 KB
testcase_05 RE -
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
MOD = 10**9+7
ans = 1
A.sort()
if A[0] < 0:
  print(-1)
elif A[-1] > 3:
  print(MOD)
else:
  for i in range(N):
    ak = 1
    for j in range(1,A[i]+1):
      ak *= j
    ans *= (A[i]**ak)
  print(MOD%ans)
0