結果
問題 | No.1237 EXP Multiple! |
ユーザー | FromBooska |
提出日時 | 2023-02-15 15:19:31 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 266 bytes |
コンパイル時間 | 268 ms |
コンパイル使用メモリ | 87,180 KB |
実行使用メモリ | 104,064 KB |
最終ジャッジ日時 | 2023-09-25 00:19:46 |
合計ジャッジ時間 | 7,231 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 69 ms
71,652 KB |
testcase_01 | AC | 127 ms
99,824 KB |
testcase_02 | AC | 156 ms
101,224 KB |
testcase_03 | AC | 157 ms
101,200 KB |
testcase_04 | AC | 124 ms
99,432 KB |
testcase_05 | AC | 103 ms
104,064 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 | -- | - |
ソースコード
from math import factorial N = int(input()) A = list(map(int, input().split())) A.sort() if 0 in A: ans = -1 elif max(A) >= 4: ans = 10**9+7 else: product = 1 for a in A: product *= pow(a, factorial(a)) ans = (10**9+7)%product print(ans)