結果
問題 | No.1237 EXP Multiple! |
ユーザー | lloyz |
提出日時 | 2022-02-06 00:12:26 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 256 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 87,036 KB |
実行使用メモリ | 110,988 KB |
最終ジャッジ日時 | 2023-09-02 06:53:15 |
合計ジャッジ時間 | 4,926 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 73 ms
71,220 KB |
testcase_01 | AC | 110 ms
98,300 KB |
testcase_02 | AC | 124 ms
99,976 KB |
testcase_03 | AC | 123 ms
100,316 KB |
testcase_04 | AC | 126 ms
99,456 KB |
testcase_05 | AC | 106 ms
103,936 KB |
testcase_06 | TLE | - |
testcase_07 | -- | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
ソースコード
n = int(input()) A = list(map(int, input().split())) mod = 10**9 + 7 if min(A) == 0: print(-1) elif max(A) >= 4: print(mod) else: ans = 1 Fact = [1, 1, 2, 6] for i in range(n): ans *= pow(A[i], Fact[A[i]]) print(mod % ans)