結果

問題 No.1237 EXP Multiple!
ユーザー pluto77pluto77
提出日時 2020-10-04 09:27:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 92 ms / 2,000 ms
コード長 239 bytes
コンパイル時間 498 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 30,768 KB
最終ジャッジ日時 2023-09-26 10:32:38
合計ジャッジ時間 3,031 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,768 KB
testcase_01 AC 69 ms
23,664 KB
testcase_02 AC 84 ms
29,160 KB
testcase_03 AC 82 ms
30,100 KB
testcase_04 AC 89 ms
30,768 KB
testcase_05 AC 52 ms
12,188 KB
testcase_06 AC 55 ms
12,084 KB
testcase_07 AC 52 ms
12,152 KB
testcase_08 AC 91 ms
11,968 KB
testcase_09 AC 52 ms
12,184 KB
testcase_10 AC 52 ms
12,040 KB
testcase_11 AC 56 ms
12,188 KB
testcase_12 AC 56 ms
12,056 KB
testcase_13 AC 92 ms
12,236 KB
testcase_14 AC 90 ms
12,184 KB
testcase_15 AC 87 ms
12,228 KB
testcase_16 AC 90 ms
12,124 KB
testcase_17 AC 87 ms
12,072 KB
testcase_18 AC 92 ms
12,212 KB
testcase_19 AC 53 ms
12,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1237
mod=1000000007
n=int(input())
a=list(map(int, input().split()))

if min(a)==0:
 print(-1)
 exit()
if max(a) >= 4:
 print(mod)
 exit()
res = 1
p=[1,1,4,729]
for i in a:
 res*=p[i]
 if res>mod:
  print(mod)
  exit()
print(mod%res)
0