Can you provide a Greedy solution for the following problem ?
Given N <= 1e18 , M <= 10,000
Provide an array D = [d1, d2, d3, ... , dk] , such that d1 * d2 * d3 * ... * dk = N, di <= M, k should be minimized, or print impossible.
Number Theory Problem
Can you provide a Greedy solution for the following problem ?
Given N <= 1e18 , M <= 10,000
Provide an array D = [d1, d2, d3, ... , dk] , such that d1 * d2 * d3 * ... * dk = N, di <= M, k should be minimized, or print impossible.
| Rev. | Язык | Кто | Когда | Δ | Комментарий | |
|---|---|---|---|---|---|---|
| en1 |
|
Omar_Morsi | 2017-11-21 00:42:59 | 260 | Initial revision (published) |