結果

問題 No.1237 EXP Multiple!
ユーザー harurunharurun
提出日時 2020-09-25 23:39:12
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 220 bytes
コンパイル時間 115 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 30,828 KB
最終ジャッジ日時 2023-09-10 17:11:57
合計ジャッジ時間 4,321 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
12,424 KB
testcase_01 AC 65 ms
23,892 KB
testcase_02 AC 87 ms
29,240 KB
testcase_03 AC 81 ms
30,264 KB
testcase_04 AC 88 ms
30,828 KB
testcase_05 AC 57 ms
11,368 KB
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 #

import math
N=input()
A=list(map(int,input().split()))
if max(A)>3:
  print(10**9+7)
elif min(A)==0:
  print(-1)
else:
  ans=1
  for i in A:
    ans*=pow(i,math.factorial(i))
  print((10**9+7)%ans)
#そういうことか
0