Problem:


Score : 200 points

Problem Statement

Find the largest square number not exceeding N. Here, a square number is an integer that can be represented as the square of an integer.

Constraints

1 \leq N \leq 10^9

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print the largest square number not exceeding N.

Sample Input 1

10

Sample Output 1

9

10 is not square, but 9 = 3 × 3 is. Thus, we print 9.

Sample Input 2

81

Sample Output 2

81

Sample Input 3

271828182

Sample Output 3

271821169



Sample input:
10


Sample output:
9

Submission status: Accepted

Solution code:
import math
N = int(input())
for i in range(N,0,-1):
    if math.sqrt(i)%1 == 0:
        print(i)
        break

Submission status: Accepted

Solution code:
import numpy as np


def main():
    n = int(input())
    while True:
        if int(np.sqrt(n)) == np.sqrt(n):
            print(n)
            exit()
        else:
            n = n-1


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
n = int(input())
s = int(math.sqrt(n))
print(s**2)

Submission status: Accepted

Solution code:
N = int(input())
print(int(N**0.5) ** 2)

Submission status: Accepted

Solution code:
n = int(input())
i = 1
while i**2 <= n:
  i += 1
print((i-1)**2)

Submission status: Accepted

Solution code:
N = int(input())

ans = 0

for i in range(10**5):
    if i ** 2 <= N:
        ans = i ** 2
        continue
    break

print(ans)

Submission status: Accepted

Solution code:
# region header
import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
from string import ascii_lowercase, ascii_uppercase, digits
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi
# endregion
N = ri()
print(floor(sqrt(N)) ** 2)

Submission status: Accepted

Solution code:
n=int(input())
ans=1
while n>=ans**2:
    ans+=1
print((ans-1)**2)

Submission status: Accepted

Solution code:
import math
n = int(input())
for i in range(n, 0, -1):
    if float.is_integer(math.sqrt(i)) == True:
        print(i)
        exit()

Submission status: Accepted

Solution code:
import math
n=int(input())
for i in range(n,0,-1):
  if math.sqrt(i)%1==0:
    print(i)
    exit()

Submission status: Accepted

Solution code:
import math

def resolve():
	n = int(input())
	for i in range(n, -1, -1):
		sr = math.sqrt(i)
		if sr - math.floor(sr) == 0:
			print(i)
			return
resolve()

Submission status: Accepted

Solution code:
n=int(input())
r=int(n**0.5)
ans=1
for i in range(r+1):
    if i**2>ans:
        ans=i**2
print(ans)

Submission status: Accepted

Solution code:
import math
N = int(input())
ans = (int(math.sqrt(N))**2)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = int(n**0.5)**2

print(ans)

Submission status: Accepted

Solution code:
import math
N = int(input())
print(int(math.pow(int(math.sqrt(N)), 2)))

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(n + 1):
  if i * i > n:
    break
  ans = i * i
print(ans)

Submission status: Accepted

Solution code:
import math

n = int(input())
a = int(math.sqrt(n))
print(a**2)

Submission status: Accepted

Solution code:
N = int(input())

print(int(N**0.5)**2)

Submission status: Accepted

Solution code:
n=int(input())
nr=int(n**0.5)
print(nr**2)

Submission status: Accepted

Solution code:
import math
n = int(input())
for i in reversed(range(n+1)):
    if round(math.sqrt(i))**2 == i:
        print(i)
        break

Submission status: Accepted

Solution code:
import math
n = int(input())
x = math.sqrt(n)
print (int(x)**2)

Submission status: Accepted

Solution code:
n=int(input())
keep=1
while keep**2<=n:
  keep+=1
print((keep-1)**2)

Submission status: Accepted

Solution code:
N=int(input())

print(int(N**0.5)**2)

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N,0,-1):
  if int(i**0.5)**2==i:
    print(i)
    break

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

for i in range(1, int(N**0.5 + 2)):
	if i**2 > N:
		print((i-1)**2)
		break

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

for i in range(1, int(N**0.5 + 4)):
	if i**2 > N:
		print((i-1)**2)
		break

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

for i in range(1, int(N**0.5 + 5)):
	if i**2 > N:
		print((i-1)**2)
		break

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
print(int(N**(1/2))**2)

Submission status: Accepted

Solution code:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

n = int(input())
print(int(n**0.5)**2)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

print(int(sqrt(N))**2)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
for i in range(N, 0, -1):
	if sqrt(i) == int(sqrt(i)):
		print(i)
		exit()

Submission status: Accepted

Solution code:
import math
N=int(input())
if math.sqrt(N)%1==0:
    print(N)
else:
    x=int(math.sqrt(N))
    print(x**2)

Submission status: Accepted

Solution code:
N = int(input())
max_power = 0
for a in range(1, N + 1):
    if a**2 <= N:
        max_power = a**2
    else:
        break
print(max_power)

Submission status: Accepted

Solution code:
n = int(input())
a = 0
for i in range(n+1):
    if i*i <= n:
        a = i*i
    else:
        break
print(a)

Submission status: Accepted

Solution code:
li =[]
for i in range(1000000):
    li.append(i**2)
N = int(input())
ans = []
for i in range(1000000):
    if li[i]<=N:
        ans.append(li[i])
print(max(ans))

Submission status: Accepted

Solution code:
n = int(input())
a = 0
for i in range(n+1):
    if i*i <= n:
        a = i*i
    else:
        break
print(a)

Submission status: Accepted

Solution code:
n=int(input())
ans=(int(n**0.5))**2
print(ans)

Submission status: Accepted

Solution code:
import math
N = int(input())
print(math.floor(N**(1/2)) ** 2)

Submission status: Accepted

Solution code:
N=int(input())

for i in reversed(range(1,N+1)):
  if i**0.5==int(i**0.5):
    print(i)
    break

Submission status: Accepted

Solution code:
N=int(input())
print((int(N**0.5))**2)

Submission status: Accepted

Solution code:
n = int(input())

ans = 1
while True:
  if ans**2 > n:
    print((ans-1)**2)
    break
  else:
    ans += 1

Submission status: Accepted

Solution code:
n=int(input())
print(int(n**0.5)**2)

#型変換の優先度が高い

Submission status: Accepted

Solution code:
N = int(input())
while N**0.5 % 1:
    N -= 1
print(N)

Submission status: Accepted

Solution code:
N=int(input())
while N:
    if N**0.5%1==0:print(N);break
    N-=1

Submission status: Accepted

Solution code:
N=int(input())
while N:
    if N**0.5%1==0:
        print(N)
        break
    else:
        N-=1

Submission status: Accepted

Solution code:
N = int(input())
i = 1
while i**2 <= N:
  i +=1
print((i-1)**2)

Submission status: Accepted

Solution code:
N=int(input())
a=1
for i in range(int(10**4.6)):
    if i**2<=N:
        ans=max(a,i**2)
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(n+1):
    if i**2 <= n:
        ans = i**2
    else:
        break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
N_sqr = N**(0.5)
print(int(N_sqr)**2)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(1, 32001):
    if i ** 2 <= n:
        ans = i ** 2
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(int(n**0.5)+1):
  l.append(i**2)
print(max(l))

Submission status: Accepted

Solution code:
def intSqrt(n):
    x = 1
    while True:
        x2 = (x + n // x) // 2
        if x2 ** 2 <= n and abs(x - x2) <= 1:
            break
        x = x2
    return x2

n = int(input())
print(intSqrt(n)**2)

Submission status: Accepted

Solution code:
N=int(input())
maxi=0
for i in range(int(N**0.5)+1):
    if maxi<i**2:
        maxi=i**2
print(maxi)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
#from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
#from math import floor, ceil
#from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
#inf = 10**17
#mod = 10**9 + 7

n=I()
for i in range(10**5):
    if i*i<=n:
        ans=i*i
print(ans)

Submission status: Accepted

Solution code:
import math
N=int(input())
 
s=math.sqrt(N)

ans=int(s)**2

print(int(ans))

Submission status: Accepted

Solution code:
import math
N = int(input())
print(int(math.floor(math.sqrt(N))**2))

Submission status: Accepted

Solution code:
n = int(input())
i = 0
while i**2 <= n:
    i += 1
print((i-1)**2)

Submission status: Accepted

Solution code:
N = int(input())
X = int(N**(0.5))
print(X**2)

Submission status: Accepted

Solution code:
import math
n = int(input())
ans = 0
for i in range(int(math.sqrt(n)) + 1):
  if i ** 2 > n:
    exit()
  elif i ** 2 > ans and i ** 2 <= n:
    ans = i ** 2
print(ans)

Submission status: Accepted

Solution code:
import math

n = int(input())
a = int(math.sqrt(n))
print(a*a)

Submission status: Accepted

Solution code:
n = int(input())
ans = int(n**(1/2))**2
print(ans)

Submission status: Accepted

Solution code:
import math
n=int(input())
print(math.floor(n**0.5)**2)

Submission status: Accepted

Solution code:
from math import sqrt
N = int(input())
for i in range(N, 0, -1):
  if sqrt(i).is_integer():
    print(i)
    exit()

Submission status: Accepted

Solution code:
import math
N = int(input())
print(int(math.sqrt(N))**2)

Submission status: Accepted

Solution code:
import math
N = int(input())
print(math.floor(N**0.5)**2)

Submission status: Accepted

Solution code:
N = int(input())
ans = 1
while ans * ans <= N:
    ans += 1

ans = (ans - 1) * (ans - 1)
print(ans)

Submission status: Accepted

Solution code:
import math
N=int(input())
print((math.floor(N**0.5))**2)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(1, int(n**0.5)+1):
    if i*i <= n:
        ans = i*i
print(ans)

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    import math
    sq = int(math.floor(math.sqrt(N)))
    print(sq**2)

            

if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
N = int(input())
for i in range(N, 0, -1):
    if i == int(i ** 0.5) ** 2:
        print(i)
        break

Submission status: Accepted

Solution code:
n=int(input())
t=1
while t*t<=n:
  t+=1
print((t-1)**2)

Submission status: Accepted

Solution code:
n = int(input())
if n==1:
    print(1)
    exit()
for i in range(1,10**5):
    if (i**2 > n):
        print((i-1)**2)
        exit()

Submission status: Accepted

Solution code:
n=int(input())
for i in reversed(range(n+1)):
  if (i**.5).is_integer():
    print(i)
    break

Submission status: Accepted

Solution code:
n = int(input())
l = []

for i in range(1,100000):
  l.append(i**2)

for i in range(len(l)):
  if l[i] > n:
    print(l[i-1])
    exit()

Submission status: Accepted

Solution code:
from math import sqrt

n = int(input())

for i in range(n, 0, -1):
    if int(sqrt(n)) ** 2 == i:
        print(i)
        exit()

Submission status: Accepted

Solution code:
import math

n = int(input())

k = n
ans = 0
while True:
  t = int(math.sqrt(k))
  if t**2==k:
    ans = k
    break
  k -= 1
print(ans)

Submission status: Accepted

Solution code:
import math

n = int(input())
i = n

while True:
    x = int(math.sqrt(i))
    if x ** 2 == i:
        ans = i
        break
    i -= 1
print(ans)

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    n=int(input())
    print(int(n**0.5)**2)

Submission status: Accepted

Solution code:
N=int(input())
print(int(N**0.5)**2)

Submission status: Accepted

Solution code:
n = int(input())
ans = 1
for i in range(n+1):
    if i**2 <= n:
        ans = i**2
    else:
        break
print(ans)

Submission status: Accepted

Solution code:
a=int(input())
k=1
for i in range(0,100000):
  if a<(k**2):
    break
  else:
    k+=1
print((k-1)**2)

Submission status: Accepted

Solution code:
a=int(input())
k=1
for i in range(0,100000):
  if a<(k**2):
    break
  else:
    k+=1
print((k-1)**2)

Submission status: Accepted

Solution code:
import math
n = int(input())
s = 1
for i in range(2, int(math.sqrt(n)) + 1):
    if i * i <= n:
        s = i * i
print(s)

Submission status: Accepted

Solution code:
N = int(input())
x = 0
while(1):
    if x*x > N:
        x -= 1
        break
    x += 1
        
print(x*x)

Submission status: Accepted

Solution code:
# solution
import io
import math

nim=int(input())
score=int(math.sqrt(nim))
result=score**2
print(result)

Submission status: Accepted

Solution code:
# coding: utf-8

#N, Q = map(int,input().split())
N = int(input())

for i in range(10**5):
    if i ** 2 > N:
        ans = (i-1) ** 2
        break
print(ans)

Submission status: Accepted

Solution code:

n = int(input())
x = 1

while x ** 2 <= n:
    x += 1
print((x-1) ** 2)

Submission status: Accepted

Solution code:
n = int(input())

for i in range(10 ** 5):
    if n == (i * i):
        print(i * i)
        exit()
    if n <= (i * i):
        break


print((i - 1) * (i - 1))

Submission status: Accepted

Solution code:
n = int(input())
ans = 1
for i in range(1, 10 ** 5):
    seq = i ** 2
    if seq <= n:
        ans = seq
    else:
        break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

ans = 0
for i in range(N + 1):
    if i * i > N:
        break
    ans = i
print(ans**2)

Submission status: Accepted

Solution code:
from sys import stdin
import math

n=int(input())
n=int(math.sqrt(n))
print(n*n)

Submission status: Accepted

Solution code:
N = int(input())
count = 1
while count ** 2 <= N:
    count += 1

print((count-1)**2)

Submission status: Accepted

Solution code:
import math
N =int(input())

for i in range(N,0,-1):
  x = math.sqrt(i)
  if x.is_integer():
    print(i)
    exit()

Submission status: Accepted

Solution code:
import math
def main():
    N = int(input())
    x = math.floor(math.sqrt(N))
    print(x**2)
main()

Submission status: Accepted

Solution code:
n=int(input())
i=1
while True:
    if i**2<=n:
        i+=1
    else:
        i-=1
        break
print(i**2)

Submission status: Accepted

Solution code:
N = int(input())

i = 1
while True:
    if i**2 <= N:
        i += 1
    else:
        i -= 1
        break

print(i**2)

Submission status: Accepted

Solution code:
# ABC 077: B – Around Square
n = int(input())
result = 1

for i in range(int(n ** (1 / 2) + 1)):
    result = max(result, i * i)

print(result)

Submission status: Accepted

Solution code:
n = int(input())

n = n**(1/2)

print(int(n)**2)

Submission status: Accepted

Solution code:
N = int(input())
ans = 1
for i in range(1,31623):
    if N >= i**2:
        ans = i**2
    else:
        break
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
a = int((N+1)**0.5)
if a**2>N:
  ans = (a-1)**2
else:
  ans = a**2
print(ans)

Submission status: Accepted

Solution code:
n = int(input())
for i in range(n):
    m = (n-i)**(1/2)
    if m == int(m):
        print(int(m**2))
        break

Submission status: Accepted

Solution code:
N = int(input())

tmp = int(N**0.5)**2

print(tmp)

Submission status: Accepted

Solution code:
n = int(input())
res = 0
for i in range(100000):
    if i * i <= n:
        res = i * i
    else:
        break

print(res)

Submission status: Accepted

Solution code:
n=int(input())
num=1
while(num**2<n+1):
    num +=1
print((num-1)**2)

Submission status: Accepted

Solution code:
import math
N=int(input())
F=float(N**0.5)
X=math.floor(F)
print(X**2)

Submission status: Accepted

Solution code:
n = int(input())
for i in range(100000):
    if i**2>n:
        print((i-1)**2)
        exit(0)

Submission status: Accepted

Solution code:
N = int(input())

print(int(N**(1/2))**2)

Submission status: Accepted

Solution code:
def main():
    n = int(input())

    for i in reversed(range(1,n+1)):
        if (i ** 0.5).is_integer():
            print(i)
            exit()

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
res = 0
for i in range(100000):
    if i * i <= n:
        res = i * i
    else:
        break

print(res)

Submission status: Accepted

Solution code:
n=int(input())

def heihou(n):
    a=int(n**0.5)
    if n==a**2:
        return True
    return False


for i in range(n):
    num=n-i
    if heihou(num):
        print(num)
        break

Submission status: Accepted

Solution code:
n = int(input())
num = 0
while True:
    if pow(num+1, 2)>n:
        break
    num += 1
ans = pow(num, 2)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
i = 1
while i**2 <= N:
    i += 1
print(((i-1)**2))

Submission status: Accepted

Solution code:
n = int(input())
i = 1
 
while True:
    if i ** 2 <= n:
        ans = i ** 2
        i = i + 1
    else:
        break
 
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
i = 1
while i * i <= N:
    i += 1
print((i-1) * (i-1))

Submission status: Accepted

Solution code:
import math
def solve(n):
    tmp = math.floor(math.sqrt(n))
    return tmp**2

if __name__ == "__main__":
    n = int(input())
    print(solve(n))

Submission status: Accepted

Solution code:
import math
print(int(math.sqrt(int(input())))**2)

Submission status: Accepted

Solution code:
N = int(input())

for i in reversed(range(1,N+1)):
    if (i ** 0.5).is_integer():
        print(i)
        break

Submission status: Accepted

Solution code:
# import sys
# import math #sqrt
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import permutations #順列生成
# import collections # deque
# from operator import itemgetter
# from fractions import Fraction

mod = int(1e9+7)
INF = 1<<29
lINF = 1<<35

def readInt():
    return list(map(int,input().split()))

def main():
    n = int(input())
    x = int(n**0.5)**2
    print(x)
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
i = 0
while i ** 2 <= n:
    ans = i ** 2
    i += 1    
print(ans)

Submission status: Accepted

Solution code:
import math
n = int(input())
print(int(math.floor(math.sqrt(n)))**2)

Submission status: Accepted

Solution code:
n = int(input())
while True:
  if (n**0.5).is_integer():
    print(n)
    break
  else:
    n-=1

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip() 

def resolve():
    N = int(input())

    print(int(N**0.5)**2)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
n=int(input())
ans = 1
for i in range(n+100):
  if i**2 > n:
    print(ans)
    break
  else:
    ans=i**2

Submission status: Accepted

Solution code:
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""

# Written by NoKnowledgeGG @YlePhan

import math
#mod = 10**9+7



def main():
  n = int(input())
  while True:
    if math.sqrt(n) == int(math.sqrt(n)):
      print(n)
      exit()
    n -=1
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import math
n = int(input())
if n<4:
    print(1)
else:
    for i in range(n,1,-1):
        if math.sqrt(i)==int(math.sqrt(i)):
            print(i)
            break

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import itertools#これは色々使える組み込み関数みたいなやつ
import fractions
import copy
import bisect
import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
from operator import itemgetter
from sys import stdin
#input = sys.stdin.readline#こっちの方が入力が早いが使える時に使っていこう
from operator import mul
from functools import reduce
from collections import Counter


N=3
M=3
i=0
j=0
k=0
n=3
r=1
a=[0]*5
b=[]
N=int(input())
real=math.sqrt(N)
#r=int(input())
#print(real)
intb=math.floor(real)
print(int(intb**2))
#print(M)
#A=int(input())
#B=int(input())
#print(N)
"1行1つの整数を入力を取得し、整数と取得する"


#number_list=list(map(int, input().split(" ")))#数字の時
#print(number_list)
"12 21 332 とか入力する時に使う"
"1行に複数の整数の入力を取得し、整数として扱う"

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
#メモ
for i in number_list:#こっちの方がrage使うより早いらしい
    print(number_list[i-1])#

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'''
x=[]
y=[]
for i in range(N):
    x1, y1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
print(x)
print(y)
"複数行に2数値を入力する形式 x座標とy座標を入力するイメージ"
'''

'''
mixlist=[]
for i in range(N):
    a,b=input().split()
    mixlist.append((int(a),b))
print(mixlist)
"複数行にintとstrを複合して入力するやつ，今回はリスト一つで処理している"
'''

'''
#array=[input().split()for i in range(N)]
#print(type(array[0][0]))
#print(array)
"正方行列にstr型の値を入力"
'''

#brray=[list(map(int, input().split(" ")))for i in range(N)]
#print(type(brray[0][0]))
#print(brray)
'''
入力
1 2
4 5
7 8
出力結果
[[1, 2], [4, 5], [7, 8]]
'''
"列数に関して自由度の高いint型の値を入力するタイプの行列"
#以下に別解を記載
#N, M = [int(i) for i in input().split()]
'''
table = [[int(i) for i in input().split()] for m in range(m)]

print(type(N))
print(N)
print(type(M))
print(M)

print(type(table))
print(table)
'''




#s=input()
#a=[int(i) for i in s]
#print(a[0])
#print([a])
#単数値．桁ごとに分割したい．入力と出力は以下の通り
#イメージとして1桁ごとにリストに値を入れているかんじ

'''
入力
1234
出力
1
[[1, 2, 3, 4]]
'''




'''
word_list= input().split(" ")
print(word_list[0])
"連続文字列の入力"
"qw er ty とかの入力に使う"
"入力すると空白で区切ったところでlistの番号が与えられる"
'''



'''
A, B, C=stdin.readline().rstrip().split()#str style 何個でもいけることが多い
print(A)
"リストではなく独立したstr型を入れるなら以下のやり方でOK"
'''


#a= stdin.readline().rstrip()
#print(a.upper())
"aという変数に入っているものを大文字にして出力"


#a,b=map(int, input().split())  #int style 複数数値入力　「A B」みたいなスペース空いた入力のとき 

#なんかうまく入力されるけど
#a=[[int(i) for i in 1.strip()]for 1 in sys.stdin]
#a = [[int(c) for c in l.strip()] for l in sys.stdin]]
#print(a)
#複数行の数値を入力して正方行列を作成


##############################################################################################
##############################################################################################
#under this line explains example calculation


#nCr combination
'''
def cmb(n,r):
    #When n < r , this function isn't valid
    r= min(n-r,r)
    #print(n,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n-r, -1))
    #flochart mul(n,n-1)=x
    #next     mul(x,n-2)........(n-r+1,n-r)
    #mul read a,b and returns a*b 

    under = reduce(mul, range(1, r+1))
    #print(over, under)
    #reduce is applied mul(1,2)=2
    #next   mul(2,3)=6
    #next   mul(6,4)=4.........last(r!,r+1)=r+1!

    return over // under
    #// is integer divide
    #calc example 5C2
    #over=5*4*3
    #under=3*2*1
a = cmb(n, r)
#print(a)
'''

'''
#集計
#example
#a=[2,2,2,3,4,3,1,2,1,3,1,2,1,2,2,1,2,1]
#a=Counter(a)
for i in a.most_common(n):print(i)
#most_common()メソッドは、出現回数が多い要素順にCounterオブジェクトを並び替えます。
#引数にint型の数字nを設定した場合は、出現回数が高い上位ｎ個の要素を返します。
#何も設定しなければ、コンテナ型にあるすべての要素を出現回数の順番に並び替えたタプル型オブジェクトを返します。
#out put
#(2, 8)
 #(1, 6)
#(3, 3)
#(4, 1)
'''


#二部探索(binary search)
#A = [1, 2, 3, 3, 3, 4, 4, 6, 6, 6, 6]
#print(A)
#index = bisect.bisect_left(A, 5) # 7 最も左(前)の挿入箇所が返ってきている
#A.insert(index, 5)
#print(index)
#print(A)
'''
bisect.bisect_left(a, x, lo=0, h=len(a))
引数
a: ソート済みリスト
x: 挿入したい値
lo: 探索範囲の下限
hi: 探索範囲の上限
(lo, hiはスライスと同様の指定方法)
bisect_leftはソートされたリストaに対して順序を保ったままxを挿入できる箇所を探索します。leftが示す通り、aにすでにxが存在している場合は、挿入箇所は既存のxよりも左側になります。また、lo, hiを指定することで探索範囲を絞り込むことも可能です。デフォルトはaの全体が探索対象です。
'''





########################################################################
########################################################################
#b2=a[:]  #1次元のときはコピーはこれで良い
#print(b2)

#a= [[0]*3 for i in range(5)] #2次元配列はこう準備、[[0]*3]*5だとだめ
#b3=copy.deepcopy(a)  #2次元配列はこうコピーする
#print(b3)

Submission status: Accepted

Solution code:
N=int(input())
for i in range(N):
  if (i**2)>N:
    break
print(max((i-1)**2,1))

Submission status: Accepted

Solution code:
N = int(input())
ans = 1
while ans**2 <= N:
    ans += 1
ans -= 1

print(ans**2)

Submission status: Accepted

Solution code:
n = int(input())
max = 0
i = 0
while i**2<=n:
    i += 1
print((i-1)**2)

Submission status: Accepted

Solution code:
n = int(input())

for i in range(31624):
    isq = i ** 2
    if n >= isq:
        maxv = isq
    else:
        break

print(maxv)

Submission status: Accepted

Solution code:
import math
n=int(input())
n1=math.sqrt(n)//1
print((int(n1))**2)

Submission status: Accepted

Solution code:
n=int(input())
print( int(n**0.5)**2)

Submission status: Accepted

Solution code:
N = int(input())

print(int((((N**0.5)//1)**2)))

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
sqs = np.array([],dtype="int64")
for i in range(1,31623):
    sqs = np.append(sqs,i**2)
print(max(sqs[sqs<=N]))

Submission status: Accepted

Solution code:
import math


print(pow(int(math.sqrt(int(input()))), 2))

Submission status: Accepted

Solution code:
n=int(input())
ans=1
cnt=1
while cnt**2<=n:
    ans=cnt**2
    cnt+=1
print(ans)

Submission status: Accepted

Solution code:
a = int(input())
print(int(a**0.5)**2)

Submission status: Accepted

Solution code:
n = int(input())
i = 1

while True:
    if i ** 2 <= n:
        ans = i ** 2
        i = i + 1
    else:
        break

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = 1
x = 1
while x * x <= n:
    ans = x * x
    x += 1

print(ans)

Submission status: Accepted

Solution code:
from math import sqrt
n = int(input())
l = []
for i in range(int(sqrt(n)) + 1):
    l.append(i ** 2)
print(max(l))

Submission status: Accepted

Solution code:
import sys
import math
x=input()
y=int(x)
z=math.sqrt(y)
w=math.floor(z)
print(w**2)

Submission status: Accepted

Solution code:

n = int(input())
result = int(n ** 0.5)
print(result **2)