結果

問題 No.1237 EXP Multiple!
ユーザー tonyu0tonyu0
提出日時 2020-09-25 23:42:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 302 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 10,736 KB
実行使用メモリ 29,820 KB
最終ジャッジ日時 2023-09-10 17:12:39
合計ジャッジ時間 2,653 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,788 KB
testcase_01 AC 61 ms
23,772 KB
testcase_02 AC 84 ms
29,068 KB
testcase_03 AC 81 ms
29,712 KB
testcase_04 AC 82 ms
29,820 KB
testcase_05 AC 54 ms
11,788 KB
testcase_06 AC 53 ms
11,728 KB
testcase_07 AC 55 ms
11,824 KB
testcase_08 AC 91 ms
11,912 KB
testcase_09 AC 55 ms
11,744 KB
testcase_10 AC 54 ms
11,844 KB
testcase_11 AC 54 ms
11,912 KB
testcase_12 AC 53 ms
11,784 KB
testcase_13 AC 85 ms
11,720 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 91 ms
11,732 KB
testcase_17 AC 86 ms
11,824 KB
testcase_18 AC 89 ms
11,708 KB
testcase_19 AC 54 ms
11,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, *a = map(int, open(0).read().split())
mx = max(a)
mn = min(a)

mod = 10 ** 9 + 7

if mn == 0:
    print(-1)
elif mx > 3:
    print(mod)
else:
    b = [0, 1, 16, 729]
    ans = 1
    for c in a:
        ans *= b[c]
        if ans > mod:
            print(mod)
            exit()
    print(mod % ans)
0