結果

問題 No.1237 EXP Multiple!
ユーザー yakeshibayakeshiba
提出日時 2021-03-07 04:52:00
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 296 bytes
コンパイル時間 144 ms
コンパイル使用メモリ 82,468 KB
実行使用メモリ 106,240 KB
最終ジャッジ日時 2024-04-17 08:15:01
合計ジャッジ時間 2,486 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,840 KB
testcase_01 AC 70 ms
91,904 KB
testcase_02 AC 88 ms
106,240 KB
testcase_03 AC 93 ms
102,076 KB
testcase_04 AC 96 ms
102,400 KB
testcase_05 AC 71 ms
95,104 KB
testcase_06 AC 69 ms
95,488 KB
testcase_07 AC 72 ms
95,232 KB
testcase_08 AC 74 ms
96,640 KB
testcase_09 AC 70 ms
95,232 KB
testcase_10 AC 71 ms
95,616 KB
testcase_11 AC 74 ms
95,488 KB
testcase_12 AC 74 ms
96,000 KB
testcase_13 AC 77 ms
96,844 KB
testcase_14 AC 74 ms
96,512 KB
testcase_15 AC 73 ms
96,128 KB
testcase_16 AC 71 ms
96,256 KB
testcase_17 AC 72 ms
96,768 KB
testcase_18 AC 74 ms
96,512 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