結果

問題 No.1237 EXP Multiple!
ユーザー yakeshibayakeshiba
提出日時 2021-03-07 04:51:14
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 244 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 265,852 KB
最終ジャッジ日時 2024-04-17 08:14:57
合計ジャッジ時間 4,314 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
59,276 KB
testcase_01 AC 71 ms
93,564 KB
testcase_02 AC 81 ms
105,884 KB
testcase_03 AC 95 ms
102,032 KB
testcase_04 AC 91 ms
102,444 KB
testcase_05 AC 69 ms
96,624 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
権限があれば一括ダウンロードができます

ソースコード

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]
    
print(mod%ans)
0