結果

問題 No.1237 EXP Multiple!
ユーザー pluto77pluto77
提出日時 2020-10-04 09:03:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 260 bytes
コンパイル時間 547 ms
コンパイル使用メモリ 10,692 KB
実行使用メモリ 30,548 KB
最終ジャッジ日時 2023-09-26 10:00:41
合計ジャッジ時間 5,373 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 65 ms
23,716 KB
testcase_02 AC 81 ms
29,248 KB
testcase_03 AC 79 ms
30,052 KB
testcase_04 AC 81 ms
30,548 KB
testcase_05 AC 48 ms
12,028 KB
testcase_06 WA -
testcase_07 AC 49 ms
12,036 KB
testcase_08 WA -
testcase_09 AC 49 ms
12,124 KB
testcase_10 AC 48 ms
12,184 KB
testcase_11 WA -
testcase_12 AC 54 ms
12,104 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 51 ms
12,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki237
n=int(input())
a=list(map(int,input().split()))
if 0 in a:
 print(-1)
 exit()
if max(a)>=4:
 print(1000000007)
 exit()
res=1
x=[1,4,729]
for i in range(n):
 res*=x[a[i]-1]
 if res>1000000007:
  print(1000000007)
  break
 else:
  print(1000000007%res)
0