結果

問題 No.1237 EXP Multiple!
ユーザー mesame3993mesame3993
提出日時 2021-11-18 19:49:55
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 435 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 86,812 KB
実行使用メモリ 104,716 KB
最終ジャッジ日時 2023-08-27 10:03:18
合計ジャッジ時間 5,136 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 104 ms
103,516 KB
testcase_06 RE -
testcase_07 AC 104 ms
103,264 KB
testcase_08 RE -
testcase_09 AC 105 ms
103,132 KB
testcase_10 AC 106 ms
103,440 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 105 ms
103,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
  from sys import stdin
  import math
  readline=stdin.readline
  n = int(readline())
  A = list(map(int, readline().split()))
  mod = 10**9 + 7
  ans = 1
  if 0 in A:
    print(-1)
    exit()
  for i in A:
    if a >= 4:
      print(mod)
      exit()
    elif a == 1:
      continue
    elif a == 2:
      ans *= 4
    elif a == 3:
      ans *= 729
    if ans > mod:
      print(mod)
      exit()
  print(mod % ans)
main()
0