結果

問題 No.1237 EXP Multiple!
ユーザー H3PO4H3PO4
提出日時 2020-09-25 22:36:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 335 bytes
コンパイル時間 79 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 30,736 KB
最終ジャッジ日時 2023-09-10 15:53:52
合計ジャッジ時間 3,105 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,828 KB
testcase_01 AC 63 ms
23,648 KB
testcase_02 AC 81 ms
29,396 KB
testcase_03 AC 78 ms
30,056 KB
testcase_04 AC 80 ms
30,736 KB
testcase_05 AC 49 ms
12,448 KB
testcase_06 AC 51 ms
12,432 KB
testcase_07 AC 51 ms
12,376 KB
testcase_08 AC 154 ms
12,372 KB
testcase_09 AC 50 ms
12,516 KB
testcase_10 AC 48 ms
12,424 KB
testcase_11 AC 51 ms
12,520 KB
testcase_12 AC 138 ms
12,428 KB
testcase_13 AC 153 ms
12,520 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 160 ms
12,604 KB
testcase_17 AC 150 ms
12,564 KB
testcase_18 AC 149 ms
12,496 KB
testcase_19 AC 51 ms
12,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = tuple(map(int, input().split()))
DIV = 10 ** 9 + 7

if 0 in A:
    print(-1)
    exit()

ans = 1
for a in A:
    if a >= 4:
        # 10e9+7を答で割る?
        print(DIV)
        exit()
    for i in range(1, a + 1):
        ans *= a ** i
    if ans > DIV:
        print(DIV)
        exit()
print(DIV % ans)
0