結果

問題 No.1237 EXP Multiple!
ユーザー 👑 rin204rin204
提出日時 2020-09-29 12:06:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 331 bytes
コンパイル時間 569 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 30,552 KB
最終ジャッジ日時 2023-09-16 17:51:20
合計ジャッジ時間 2,930 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,824 KB
testcase_01 AC 56 ms
23,844 KB
testcase_02 AC 73 ms
29,200 KB
testcase_03 AC 70 ms
30,192 KB
testcase_04 AC 71 ms
30,552 KB
testcase_05 AC 46 ms
12,056 KB
testcase_06 AC 46 ms
12,096 KB
testcase_07 AC 48 ms
12,104 KB
testcase_08 AC 101 ms
12,144 KB
testcase_09 AC 46 ms
12,136 KB
testcase_10 AC 45 ms
12,164 KB
testcase_11 AC 45 ms
12,204 KB
testcase_12 AC 80 ms
12,060 KB
testcase_13 AC 85 ms
12,156 KB
testcase_14 AC 86 ms
12,192 KB
testcase_15 AC 85 ms
12,096 KB
testcase_16 AC 86 ms
12,104 KB
testcase_17 AC 85 ms
12,064 KB
testcase_18 AC 86 ms
12,128 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
alst = list(map(int, input().split()))
f = [1, 2 ** 2, 3 ** 6]
ans = 1
for a in alst:
    if a >= 4:
        print(10 ** 9 + 7)
        break
    elif a == 0:
        print(-1)
        break
    ans *= f[a - 1]
    if ans > 10 ** 9 + 7:
        print(10 ** 9 + 7)
        break
else:
    print((10 ** 9 + 7) % ans)
0