結果
問題 | No.2576 LCM Pattern |
ユーザー | ntuda |
提出日時 | 2023-12-23 12:37:17 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 565 bytes |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 84,808 KB |
最終ジャッジ日時 | 2023-12-23 12:37:22 |
合計ジャッジ時間 | 4,851 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 41 ms
62,568 KB |
testcase_01 | AC | 40 ms
55,764 KB |
testcase_02 | AC | 40 ms
55,764 KB |
testcase_03 | AC | 40 ms
55,764 KB |
testcase_04 | AC | 40 ms
55,764 KB |
testcase_05 | AC | 40 ms
55,764 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 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
ソースコード
from math import comb import collections def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a def n_fact(N): c = collections.Counter(prime_factorize(N)) return c N,M = map(int,input().split()) X = n_fact(M) ans = 1 for k,v in X.items(): tmp = 0 for i in range(N): tmp += comb(N, i) * v ** i ans *= tmp print(ans)