結果

問題 No.1237 EXP Multiple!
ユーザー googol_S0googol_S0
提出日時 2020-09-25 21:23:50
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 234 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 86,948 KB
実行使用メモリ 104,872 KB
最終ジャッジ日時 2023-09-10 14:51:26
合計ジャッジ時間 4,044 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,160 KB
testcase_01 AC 99 ms
97,776 KB
testcase_02 AC 121 ms
99,828 KB
testcase_03 AC 119 ms
100,076 KB
testcase_04 AC 120 ms
99,112 KB
testcase_05 RE -
testcase_06 AC 101 ms
103,868 KB
testcase_07 RE -
testcase_08 AC 108 ms
104,540 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 104 ms
103,644 KB
testcase_12 AC 108 ms
104,368 KB
testcase_13 AC 107 ms
104,436 KB
testcase_14 AC 107 ms
104,392 KB
testcase_15 AC 107 ms
104,576 KB
testcase_16 AC 108 ms
104,484 KB
testcase_17 AC 108 ms
104,600 KB
testcase_18 AC 108 ms
104,384 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)
print((10**9+7)%P)
0