結果

問題 No.1237 EXP Multiple!
ユーザー harurunharurun
提出日時 2020-09-25 23:41:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 281 bytes
コンパイル時間 94 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 30,596 KB
最終ジャッジ日時 2023-09-10 17:31:02
合計ジャッジ時間 2,611 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,848 KB
testcase_01 AC 61 ms
23,656 KB
testcase_02 AC 78 ms
29,172 KB
testcase_03 AC 77 ms
30,116 KB
testcase_04 AC 82 ms
30,596 KB
testcase_05 AC 55 ms
11,364 KB
testcase_06 AC 55 ms
11,380 KB
testcase_07 AC 56 ms
11,304 KB
testcase_08 AC 107 ms
11,380 KB
testcase_09 AC 55 ms
11,392 KB
testcase_10 AC 55 ms
11,372 KB
testcase_11 AC 55 ms
11,444 KB
testcase_12 AC 51 ms
11,344 KB
testcase_13 AC 105 ms
11,376 KB
testcase_14 AC 106 ms
11,440 KB
testcase_15 AC 108 ms
11,300 KB
testcase_16 AC 102 ms
11,332 KB
testcase_17 AC 107 ms
11,368 KB
testcase_18 AC 104 ms
11,360 KB
testcase_19 AC 55 ms
11,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=input()
A=list(map(int,input().split()))
d=[1,1,2,6]
if max(A)>3:
  print(10**9+7)
elif min(A)==0:
  print(-1)
else:
  ans=1
  for i in A:
    ans*=pow(i,d[i])
    if ans>1000000007:
      print(10**9+7)
      break
  else:
    print((10**9+7)%ans)
#そういうことか take3
0