結果

問題 No.1237 EXP Multiple!
ユーザー googol_S0googol_S0
提出日時 2020-09-25 21:24:08
言語 PyPy3
(7.3.13)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 243 bytes
コンパイル時間 490 ms
コンパイル使用メモリ 87,356 KB
実行使用メモリ 104,760 KB
最終ジャッジ日時 2023-09-10 17:21:01
合計ジャッジ時間 3,584 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,356 KB
testcase_01 AC 99 ms
97,960 KB
testcase_02 AC 120 ms
100,228 KB
testcase_03 AC 119 ms
100,124 KB
testcase_04 AC 128 ms
99,172 KB
testcase_05 AC 112 ms
104,540 KB
testcase_06 AC 106 ms
103,724 KB
testcase_07 AC 110 ms
104,616 KB
testcase_08 AC 111 ms
104,528 KB
testcase_09 AC 111 ms
104,744 KB
testcase_10 AC 112 ms
104,532 KB
testcase_11 AC 106 ms
103,884 KB
testcase_12 AC 106 ms
104,536 KB
testcase_13 AC 104 ms
104,540 KB
testcase_14 AC 106 ms
104,652 KB
testcase_15 AC 107 ms
104,536 KB
testcase_16 AC 105 ms
104,364 KB
testcase_17 AC 105 ms
104,760 KB
testcase_18 AC 109 ms
104,512 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int,input().split()))
F=[1,1,2,6]
P=1
for i in range(N):
  if A[i]>3:
    print(10**9+7)
    exit()
  P*=pow(A[i],F[A[i]])
  if P>10**9+7:
    print(10**9+7)
    exit()
if P==0:
  print(-1)
  exit()
print((10**9+7)%P)
0