結果

問題 No.1237 EXP Multiple!
ユーザー yakeshibayakeshiba
提出日時 2021-03-07 04:57:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 82,404 KB
実行使用メモリ 105,856 KB
最終ジャッジ日時 2024-04-17 08:15:10
合計ジャッジ時間 2,528 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,584 KB
testcase_01 AC 74 ms
92,032 KB
testcase_02 AC 87 ms
105,856 KB
testcase_03 AC 97 ms
101,632 KB
testcase_04 AC 99 ms
101,888 KB
testcase_05 AC 74 ms
95,232 KB
testcase_06 AC 72 ms
95,104 KB
testcase_07 AC 74 ms
95,488 KB
testcase_08 AC 76 ms
96,512 KB
testcase_09 AC 73 ms
95,744 KB
testcase_10 AC 72 ms
95,488 KB
testcase_11 AC 72 ms
95,232 KB
testcase_12 AC 75 ms
96,128 KB
testcase_13 AC 75 ms
96,128 KB
testcase_14 AC 75 ms
96,512 KB
testcase_15 AC 75 ms
96,128 KB
testcase_16 AC 77 ms
96,512 KB
testcase_17 AC 78 ms
96,512 KB
testcase_18 AC 75 ms
96,128 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 10**9+7
n = int(input())
A = list(map(int,input().split()))

prod = [1,4,3**6]

ans = 1
for a in A:
    if a == 0:
        print(-1)
        exit()
    if a >= 4:
        print(mod)
        exit()
    ans *= prod[a-1]
    if ans > mod:
        print(mod)
        exit()
    
print(mod%ans)
0