Math, asked by honeydrall1460, 9 months ago

28. minimum number of squares whose sum equals to given number n

Answers

Answered by banuthenu30
0

Answer:

root of n

Step-by-step explanation:

a little doubt

Answered by SelieVisa
2

Answer:

A number can always be represented as a sum of squares of other numbers. Note that 1 is a square and we can always break a number as (1*1 + 1*1 + 1*1 + …). Given a number n, find the minimum number of squares that sum to X.

Examples :

Input: n = 100

Output: 1

100 can be written as 102. Note that 100 can also be written as 52 + 52 + 52 + 52, but this representation requires 4 squares.

Input: n = 6

Output: 3

Similar questions