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())
n=math.sqrt(N)

print(int(n)**2)

Submission status: Accepted

Solution code:
#インポート
import sys

#入力用
def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

N = II()
i = 1
while i**2 <= N:
    i += 1
print((i-1)**2)

Submission status: Accepted

Solution code:
# ABC077b
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

Submission status: Accepted

Solution code:
N = int(input())
T = 1

while True:
    T += 1
    if N < T**2:
        break

print((T-1)**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

from math import sqrt

print(int(sqrt(n)) ** 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import  math
from statistics import *
from collections import *
from operator import itemgetter
"""
from fractions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
"""
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()
ans = -1
for i in range(1, 1000000000):
    num = i ** 2
    if n >= num:
        ans = num
    else:
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
[exit(0)if i**2>N else print(i**2)if(i+1)**2>N else print(end="")for i in range(1,N+1)]

Submission status: Accepted

Solution code:
N=int(input())
[exit(0) if i ** 2 > N else print(i ** 2) if (i+1) ** 2 > N else print("", end="") for i in range(1, N+1)]

Submission status: Accepted

Solution code:
print(pow(int(pow(int(input()),0.5)),2))

Submission status: Accepted

Solution code:
N = int(input())

rootN = N**(1/2)
ans = int(rootN)**2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
r = 0
for i in range(0, 100001):
  if i*i <= N:
    r = i*i
  else:
    break
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

for i in range(10**9):
  if n<i**2:
    print((i-1)**2)
    break

Submission status: Accepted

Solution code:
# input
N = int(input())

# solution
import numpy as np
for i in range(N, 0, -1):
    if np.sqrt(i) - int(np.sqrt(i)) == 0:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
saidai=1
for i in range(1,N):
    k=i**2
    if k<=N:
        saidai=max(k,saidai)
    else:
        break

print(saidai)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

for i in reversed(range(n + 1)):
    if math.sqrt(i).is_integer():
        print(i)
        exit()

Submission status: Accepted

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

n = math.sqrt(N)

if n == math.floor(n):
    print(N)

else:
    print(pow(math.floor(n), 2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
c = 1
for i in reversed(range(int(N**(1/2))+1)):
    if i**2 <= N:
        c = i**2
        break
    break

print(c)

Submission status: Accepted

Solution code:
n = int(input())
from math import sqrt
nn = int(sqrt(n))
print(nn*nn)

Submission status: Accepted

Solution code:
n = int(input())
for i in range(int(n**.5),0,-1):
  if i**2 <= n:
    print(i**2)
    break

Submission status: Accepted

Solution code:
X = int(input())
print(int((X**.5))**2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import sqrt
N = int(input())
m = int(sqrt(N))
print((m + 1) ** 2 if (m + 1) ** 2 <= N else m ** 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

for i in range(n,0,-1):
  if (i**0.5)%1==0:
    print(i)
    break

Submission status: Accepted

Solution code:
n=int(input())

for i in range(n,0,-1):
  if float(i**0.5).is_integer():
    print(i)
    break

Submission status: Accepted

Solution code:
N=int(input())

list=[]
if N==0:
    list.append(0)
for i in range(0,N+1,1):
    if i**2 <= N:
        list.append(i**2)
    else:
        break
print(max(list))

Submission status: Accepted

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

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:
import math

N = int(input())

for n in range(int(math.sqrt(N))+1):
    a = n**2
    if a > N:
        break
print(a)

Submission status: Accepted

Solution code:
import math

n=int(input())

for i in reversed(range(1,n+1)):
    num=math.sqrt(i)
    if num==int(num):
        print(i)
        break

Submission status: Accepted

Solution code:
n = int(input())

print(int(n ** .5) ** 2)

Submission status: Accepted

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

print((i - 1) ** 2)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

for i in range(n + 1)[::-1]:
    if (i**.5).is_integer():
        print(i)
        quit()

Submission status: Accepted

Solution code:
n=int(input())
z=int(n**.5//1)
ans=0
for i in range(z+1):
  if i**2<=n:
    ans=i**2
print(ans)

Submission status: Accepted

Solution code:
import numpy as np


n = int(input())
print(int(np.sqrt(n))**2)

Submission status: Accepted

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

print((math.floor(math.sqrt(n)))**2)

Submission status: Accepted

Solution code:
from math import sqrt

n = int(input())
m = int(sqrt(n))
print(m ** 2)

Submission status: Accepted

Solution code:
n = int(input())
for i in range(n,0,-1):
    if (i**0.5)%1 == 0:
        print(i)
        exit(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
N = int(input())
print(int(np.sqrt(N))**2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
x=int(input())
num=math.floor(x**.5)
print(num**2)

Submission status: Accepted

Solution code:
import sys
import math
input=sys.stdin.readline

N = int(input())

x = int(math.sqrt(N))
print(x*x)

Submission status: Accepted

Solution code:
N = int(input())

i = 1
while True:
  if i ** 2 > N:
    print ((i-1) ** 2)
    break
  else:
    i += 1
else:
  print ("error")

Submission status: Accepted

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

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 (i ** .5).is_integer():
        print(i)
        exit()

print(0)

Submission status: Accepted

Solution code:
import math
a = int(input())
b = int(math.sqrt(a))
print(b * b)

Submission status: Accepted

Solution code:
import math

N = int(input())
print(math.floor(math.sqrt(N))**2)

Submission status: Accepted

Solution code:
N = int(input())

for i in range(N,0,-1):
  if (i**0.5).is_integer():
    print(int(i))
    exit()

Submission status: Accepted

Solution code:
N = int(input())
import math
for i in range(N,-1,-1):
  sq = math.sqrt(i)
  if sq.is_integer():
    ans = i
    break

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

a = 1
ans = 1
while True:
    if a**2 <= n:
       ans = max(ans, a**2) 
    else:
        break
    a += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:

N=int(input())

Flag=0
while Flag==0:
  Tmp=N**0.5

  Tmp2 = round(Tmp)

  if Tmp2 == Tmp:
    Flag=1
  else:
    N -= 1

print(N)

Submission status: Accepted

Solution code:
n=int(input())
for i in range(n,0,-1):
  if i**0.5%1 == 0:
    print(i)
    exit()

Submission status: Accepted

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

print(math.floor(math.sqrt(n))**2)

Submission status: Accepted

Solution code:
import math

n = int(input())

print(int(math.sqrt(n)) ** 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(int(math.floor(math.sqrt(n))**2))

Submission status: Accepted

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

ans = n
while True:  # breakなどされるまで無限ループ
    ans_sqrt = math.sqrt(ans)
    if math.ceil(ans_sqrt) == math.floor(ans_sqrt):
        print(ans)
        exit()
    else:
        ans -= 1

Submission status: Accepted

Solution code:

N = int(input())

for i in range(1,100000000):
    if i * i> N :
        print((i - 1) * (i - 1))
        break

Submission status: Accepted

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

ans = int(math.sqrt(N))
ans = ans ** 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())
square = sorted([i**2 for i in range(100000)], reverse=True)

for i in square:
    if i <= n:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(input())

a = math.sqrt(n)

a = int(a)

print(a*a)

Submission status: Accepted

Solution code:
# ABC 77, B - around sqare
import math
n = int(input())
print(math.floor(math.sqrt(n))**2)

Submission status: Accepted

Solution code:
n=int(input())

num=1
flag=True
for i in range(n):
    if flag:
       if i**2>n:
            num=(i-1)**2
            flag=False
            break
print(num)

Submission status: Accepted

Solution code:
import math

N = int(input())

print(math.floor(math.sqrt(N)) ** 2)

Submission status: Accepted

Solution code:
n=int(input());print(int(n**.5)**2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ansMax = 0
for i in range(10**5):
    tmp = i ** 2
    if tmp <= N:
        ansMax = tmp
    #else:
    #    break

print(ansMax)

Submission status: Accepted

Solution code:
N = int(input())
ansMax = 0
for i in range(10**5):
    tmp = i ** 2
    if tmp <= N:
        ansMax = tmp
    else:
        break

print(ansMax)

Submission status: Accepted

Solution code:
N = int(input())
num = 1
while True:
  if num**2 > N:
    print((num-1)**2)
    break
  else:
    num += 1

Submission status: Accepted

Solution code:
n = int(input())
mx = 0
for i in range(100000):
  if i ** 2 <= n:
    mx = i**2
print(mx)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(N: int):
    print(int(-N**0.5)**2)
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math

# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    ans = 1
    
    for i in range(N,0,-1):
        tmp = math.sqrt(i)
        if tmp.is_integer():
            print(i)
            sys.exit()
            	
if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 1
for i in range(1,N+1):
	if i*i <= N:
		continue
	else:
		ans = (i-1)**2
		break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = 0
for i in range(1, int(a**0.5)+1):
    if i ** 2 <= a:
        b = max(b, i**2)
print(b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

for i in range(n, 0, -1):
  if str(i ** 0.5)[-1] == "0":
    print(i)
    exit()

Submission status: Accepted

Solution code:
import math


if __name__ == '__main__':
    N = int(input())

    answer = -1
    for i in reversed(range(N+1)):
        if int(math.sqrt(i)) * int(math.sqrt(i)) == i:
            answer = i
            break
    print(answer)

Submission status: Accepted

Solution code:

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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 S_LIST(): return list(input())

# def LIST(): return list(map(str, input().split()))
# def LIST(): return list(input())

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

i = 1
while(1):
    i += 1
    if i * i > N:
        ans = (i - 1) * (i - 1)
        print(ans)
        exit()

Submission status: Accepted

Solution code:

import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

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 S_LIST(): return list(input())

# def LIST(): return list(map(str, input().split()))
# def LIST(): return list(input())

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

i = 1
while(1):
    i += 1
    if i * i > N:
        ans = (i - 1) * (i - 1)
        print(ans)
        os.sys.exit()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC077-B 模範解答
N = int(input())
for i in range(1, N+2):
    if i ** 2 > N:
        print((i - 1) ** 2)
        break

Submission status: Accepted

Solution code:
# ABC077-B
import math
def check(N):
    n = math.sqrt(N)
    return math.floor(n) == math.ceil(n)
N = int(input())
flag = False
for i in range(N, 0, -1):
    flag = check(i)
    if flag:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

idx = 0
while True:
    idx += 1
    if idx ** 2 > n:
        idx -= 1
        break

print(idx ** 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
i = 1
squares = []
while i*i <= N:
	squares.append(i*i)
	i += 1
print(squares[-1])

Submission status: Accepted

Solution code:
import math
n=int(input())
n_sqrt=int(math.sqrt(n))
ans=n_sqrt**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())

for i in range(1, n+1):
    if (i+1)**2 > n:
        print(i**2)
        break

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#ABC77 B

n = int(input())

for i in range(n+1)[::-1]:
    if i**(1/2) % 1 == 0:
        print(i)
        quit()

Submission status: Accepted

Solution code:
import math

N = int(input())
print(int(math.sqrt(N)) ** 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 math

N = int(input())

up = int(math.sqrt(N) + 1)
for n in range(up,-1,-1):
    if n*n <= N:
        print(n*n)
        break

Submission status: Accepted

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

for i in range(a):
  if a-i==math.floor(math.sqrt(a-i))**2:
    print(a-i)
    break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 1
while True:
    if ans ** 2 > N:
        break;
    ans += 1

print((ans-1) ** 2)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N = int(input())
i = 1

while True:
    if N < pow(i, 2):
        print(pow(i - 1, 2))
        exit()
    else:
        i += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d = int(n**0.5)
print(d**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:
import math
n = int(input())
print((math.floor(n**(1/2))**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(raw_input())
from math import sqrt
print int(sqrt(n))**2

Submission status: Accepted

Solution code:

N = int(input())

i = 0
while True:

    if i ** 2 > N:
        print ((i-1)**2)
        break

    i += 1

Submission status: Accepted

Solution code:
import numpy as np

n = int(input())

sqrt_n = int(np.sqrt(n))

print(sqrt_n ** 2)

Submission status: Accepted

Solution code:
from math import sqrt, floor

n = int(input())
rt = floor(sqrt(n))
print(rt**2)

Submission status: Accepted

Solution code:
n=int(input())
while((n**0.5)%1!=0):
    n -=1
print(n)

Submission status: Accepted

Solution code:
n=int(input())

ans=1

while True:
    x=ans**2
    if x>n:
        break
    ans+=1

print((ans-1)**2)

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
for i in range(10**5):
    if i*i <= N:
        ans = i*i
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import math


def solve(N: int):
    print(math.floor(math.pow(N,0.5))**2)



# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

import math
N = n()

M = int(math.sqrt(N))
print(M*M)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
import math
def solve():
    N = int(input())
    ans = int(math.sqrt(N))**2
    print(ans)


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

n = int(input())
for i in range(max(n, 10**6)):
    if n < i**2:
        ans = (i-1)**2
        break
print(ans)

Submission status: Accepted

Solution code:
n=int(input())
i=0
while True:
    i+=1
    if i**2>n:
        print((i-1)**2)
        exit()

Submission status: Accepted

Solution code:
def abc():
    import math
    n = int(input())
    for i in reversed(range(1, n + 1)):
        sq = math.sqrt(i)
        if int(sq) == sq:
            print(i)
            return
    print(1)


abc()

Submission status: Accepted

Solution code:
N = int(input())
ans = 0

if N == 1:
    print(1)
else:
    for i in range(N):
        if i**2 <= N:
            ans = i**2
        else:
            break

    print(ans)

Submission status: Accepted

Solution code:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys
import string


if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")



N = int(sys.stdin.readline())
print(int(math.sqrt(N)) ** 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import time
import re
import math

def main():
    n=int(input())
    print(int(math.pow(math.floor(math.sqrt(n)),2)))
main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

n = int(input())
i = 1
while i**2 <= n:
    i += 1

print((i-1)**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

while n >= 0:
  if (n**0.5).is_integer():
    print(n)
    exit()
  n = n -1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def main():
    num = int(input())
    a = int(num ** 0.5)
    print(a ** 2)



if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
i = 1
while i**2 <= a:
  i += 1
  if i**2 > a:
    i -= 1
    print(i**2)
    break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    print(int(pow(int(input()), 0.5)) ** 2)


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0

if N == 1:
    print(1)
else:
    for i in range(N):
        if i**2 <= N:
            ans = i**2
        else:
            break
    print(ans)

Submission status: Accepted

Solution code:
n = int(input())
import sys
sys.setrecursionlimit(10**5)
def solve(i,n):
    if i**2 >n:
        return print((i-1)**2)
    else:
        return solve(i+1,n)

solve(1,n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

for _ in range(N):
    n = N ** 0.5
    if n // 1 == n:
        print(N)
        break
    N -= 1

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial
from heapq import heappop, heappush, heappushpop
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N = I()
    for i in range(1, int(sqrt(N) + 2)):
        if i * i <= N:
            ans = i * i
        else:
            print(ans)
            exit()
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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