結果

問題 No.1237 EXP Multiple!
ユーザー irumo8202irumo8202
提出日時 2022-01-30 14:26:48
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 396 ms
コンパイル使用メモリ 87,320 KB
実行使用メモリ 104,608 KB
最終ジャッジ日時 2023-09-02 01:37:15
合計ジャッジ時間 6,208 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,424 KB
testcase_01 AC 98 ms
98,196 KB
testcase_02 AC 112 ms
100,024 KB
testcase_03 AC 112 ms
99,992 KB
testcase_04 AC 114 ms
99,276 KB
testcase_05 AC 97 ms
103,948 KB
testcase_06 AC 96 ms
103,808 KB
testcase_07 AC 97 ms
103,812 KB
testcase_08 AC 100 ms
104,580 KB
testcase_09 AC 98 ms
104,044 KB
testcase_10 AC 97 ms
103,896 KB
testcase_11 AC 97 ms
104,000 KB
testcase_12 AC 98 ms
104,468 KB
testcase_13 AC 98 ms
104,388 KB
testcase_14 AC 98 ms
104,160 KB
testcase_15 AC 99 ms
104,416 KB
testcase_16 AC 100 ms
104,252 KB
testcase_17 AC 98 ms
104,608 KB
testcase_18 AC 97 ms
104,392 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 10 ** 9 + 7

N = int(input())
A = list(map(int, input().split()))

ans = 1
for a in A:
    if a == 0:
        print(-1)
        exit()
    elif a == 2:
        ans *= 4
    elif a == 3:
        ans *= 729
    elif a >= 4:
        print(MOD)
        exit()

    if ans > MOD:
        print(MOD)
        exit()
print(MOD % ans)
0