結果

問題 No.1237 EXP Multiple!
ユーザー 👑 timitimi
提出日時 2020-09-26 18:26:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 297 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 10,768 KB
実行使用メモリ 30,092 KB
最終ジャッジ日時 2023-09-11 23:40:53
合計ジャッジ時間 2,846 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,888 KB
testcase_01 AC 64 ms
23,660 KB
testcase_02 AC 80 ms
29,168 KB
testcase_03 AC 78 ms
30,092 KB
testcase_04 AC 84 ms
29,888 KB
testcase_05 AC 52 ms
11,432 KB
testcase_06 AC 53 ms
11,396 KB
testcase_07 AC 55 ms
11,396 KB
testcase_08 AC 93 ms
11,292 KB
testcase_09 AC 53 ms
11,468 KB
testcase_10 AC 52 ms
11,260 KB
testcase_11 AC 52 ms
11,432 KB
testcase_12 RE -
testcase_13 WA -
testcase_14 AC 89 ms
11,264 KB
testcase_15 AC 90 ms
11,408 KB
testcase_16 AC 93 ms
11,328 KB
testcase_17 AC 89 ms
11,372 KB
testcase_18 AC 90 ms
11,340 KB
testcase_19 AC 52 ms
11,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
A=list(map(int, input().split()))
mod=10**9+7
if min(A)==0:
    print(-1)
    exit()
D=[1,1,4,729]
d=1
for i in A:
    if i>4:
        print(mod)
        exit()
    else:
        d*=D[i]
    if d>mod:
        print(mod)
        exit()
if d==1:
    print(mod)
    exit()
print(mod%d)
0