結果

問題 No.1237 EXP Multiple!
ユーザー googol_S0googol_S0
提出日時 2020-09-25 21:47:14
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 202 bytes
コンパイル時間 417 ms
コンパイル使用メモリ 87,316 KB
実行使用メモリ 104,796 KB
最終ジャッジ日時 2023-09-10 17:23:09
合計ジャッジ時間 3,552 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,340 KB
testcase_01 AC 103 ms
98,052 KB
testcase_02 AC 120 ms
99,888 KB
testcase_03 AC 119 ms
99,872 KB
testcase_04 AC 121 ms
99,132 KB
testcase_05 AC 106 ms
104,620 KB
testcase_06 AC 102 ms
103,656 KB
testcase_07 AC 106 ms
104,688 KB
testcase_08 AC 106 ms
104,796 KB
testcase_09 AC 106 ms
104,616 KB
testcase_10 AC 106 ms
104,668 KB
testcase_11 AC 101 ms
103,768 KB
testcase_12 AC 106 ms
104,528 KB
testcase_13 AC 105 ms
104,440 KB
testcase_14 AC 104 ms
104,664 KB
testcase_15 AC 105 ms
104,712 KB
testcase_16 AC 105 ms
104,428 KB
testcase_17 AC 105 ms
104,368 KB
testcase_18 AC 104 ms
104,660 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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