### saba_tavdgiridze's blog

By saba_tavdgiridze, 7 years ago,

Hello everybody.I'm looking at this problem and I've no idea how to solve it. It's about that,with minimum number of 1's and operations of addition, multiplication and parenthesis you must obtain positive number n.

• +3

 » 7 years ago, # |   +7 I think it can help youSo, suppose we know this minimum for all 1 <= i < n. (If n == 1, answer is 1). How can we get n? Only by addition or multiplication. So, answer[n] = minimum(answer[a] + answer[b] | a + b == n or a * b == n, a < n, b < n)