For this Question: A number is called Silly if it can be represented as the sum of the square of consecutive natural numbers starting from 1.
For a given number N, find the closest silly number.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>SillyNumber()</b> that takes integer N as argument.

Constraints:-
1 <= N <= 100000Return the closest Silly number.

Note:- If more than one answer exists return the minimum one.Sample Input:-
18

Sample Output:-
14

Explanation:-
1*1 + 2*2 + 3*3 = 14

Sample Input:-
2

Sample Output:-
1, I have written this Solution Code: def SillyNumber(N):
    sum=0
    x=1
    while sum<N:
        sum=sum+x*x
        x=x+1
    x=x-1
    if (sum-N) < (N-(sum-x*x)):
        return sum;
    else:
        return sum - x*x
, In this Programming Language: Python, Now tell me if this Code is compilable or not?