結果
問題 |
No.811 約数の個数の最大化
|
ユーザー |
![]() |
提出日時 | 2019-04-12 23:10:16 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 509 bytes |
コンパイル時間 | 207 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 44,592 KB |
最終ジャッジ日時 | 2024-09-15 06:14:33 |
合計ジャッジ時間 | 10,542 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 12 |
ソースコード
""" not correct """ import itertools as it import numpy as np def prime_factrization(N): arr = [] for i in range(2, N+1): while N%i==0: arr.append(i) N = N//i if N==1: return arr def find_M(arr): ms = set(list(it.combinations(arr, len(arr)-1))) temp = 0 M = 0 for m in ms: if len(set(m)) > temp: temp = len(set(m)) M = np.prod(m) elif len(set(m)) == temp and np.prod(m) < M: M = np.prod(m) N, K = map(int, input().split()) arr = prime_factrization(N) print(find_M(arr))