题目描述
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...
) which sum to n.
Example 1:
1 | Input: n = 12 |
Example 2:
1 | Input: n = 13 |
代码实现
1 | class Solution { |
题目描述
Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, ...
) which sum to n.
Example 1:
1 | Input: n = 12 |
Example 2:
1 | Input: n = 13 |
代码实现
1 | class Solution { |