結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,560 KB
testcase_01 AC 95 ms
98,088 KB
testcase_02 AC 114 ms
100,308 KB
testcase_03 AC 113 ms
100,328 KB
testcase_04 AC 114 ms
99,404 KB
testcase_05 AC 95 ms
103,876 KB
testcase_06 AC 94 ms
103,968 KB
testcase_07 AC 95 ms
103,940 KB
testcase_08 AC 97 ms
104,488 KB
testcase_09 AC 95 ms
103,836 KB
testcase_10 AC 98 ms
103,868 KB
testcase_11 AC 96 ms
104,008 KB
testcase_12 AC 98 ms
104,388 KB
testcase_13 AC 97 ms
104,584 KB
testcase_14 AC 96 ms
104,628 KB
testcase_15 AC 97 ms
104,236 KB
testcase_16 AC 97 ms
104,460 KB
testcase_17 AC 97 ms
104,424 KB
testcase_18 AC 98 ms
104,512 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