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,-1,-1):
    a=math.ceil(math.sqrt(i))
    if a*a==i:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

cnt = 1

while True:
    if cnt ** 2 > N:
        # オーバーしたらひとつ前の値を出力
        print((cnt -1) ** 2)
        exit()
    else:
        cnt += 1

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())
X=1
M=1
while N>=M:
    X=X+1
    M=X*X
   
X=X-1
M=X*X
    
print(M)

Submission status: Accepted

Solution code:
import math

N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N=int(raw_input())
sq=int(math.sqrt(N))
print sq*sq

Submission status: Accepted

Solution code:
import math
N=int(input().strip())
rn=math.sqrt(N)
if int(rn)-N==0:
    print(N)
else:
    print(int(rn)**2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

res = 1
idx = 1
while True:
    tmp = idx * idx
    if tmp > N:
        print(res)
        exit()
    res = tmp
    idx += 1

Submission status: Accepted

Solution code:
N = int(input())

for i in range(N+1):
    n = i*i
    if n > N:
        break
        
    res = n

print(res)

Submission status: Accepted

Solution code:
N = int(input())


def max_square(n):
    """
    >>> max_square(10)
    9
    >>> max_square(81)
    81
    >>> max_square(271828182)
    271821169
    """
    base = 0
    while (base + 1)**2 <= n:
        base += 1
    return base**2


print(max_square(N))

Submission status: Accepted

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

n = int(input())
root = 1
while root**2 <= n:
    root += 1
print((root-1)**2)

Submission status: Accepted

Solution code:
N = int(input())

sq = 0
i = 0
while N >= sq:
    i += 1
    sq = i ** 2

print((i-1)**2)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

print('{}'.format(int(n**(1/2))**2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

heiho = 1
kazu = 1

while heiho<=N:
    heiho = kazu*kazu
    kazu += 1

print((kazu-2)**2)

Submission status: Accepted

Solution code:
from math import sqrt, floor

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    n = N**0.5
    n = int(n//1)
    return n**2

print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a = int(input())
b = math.sqrt(a)
c = math.floor(b)
d = c**2

print(d)

Submission status: Accepted

Solution code:
N = int(input())
ans = 1
c = 1
while c<=N**(1/2):
    c += 1
    if c**2<=N:
        ans = c
print(ans**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
N = int(input())
while True:
    if N**.5 - int(N**.5) == 0:
        break
    N -= 1
print(N)

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())
for i in range(n, 0, -1):
  if int(math.sqrt(i)) ** 2 == i:
    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())
for i in range (100000):
    if N < i*i:
        print((i-1)*(i-1))
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
ans = 1
while (ans+1)*(ans+1) <= N:
    ans += 1

print(ans*ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

while True:
    if (a+1)**2>N:
        break
    a+=1
print(a**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import sqrt, floor

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

Submission status: Accepted

Solution code:
n = int(input())
import math as m
x = round(m.sqrt(n)) + 1
while x > m.sqrt(n) :
    x = x - 1
    
print(x*x)

Submission status: Accepted

Solution code:
import math

x = math.floor(math.sqrt(int(input())))
print(x * x)

Submission status: Accepted

Solution code:
n=int(input())
print(list(filter(lambda x:x*x<=n,range(int(1e5))))[-1]**2)

Submission status: Accepted

Solution code:
n = int(input())
for x in range(n+1):
    if x**2 <= n:
        hold = x**2
    elif x**2 > n:
        break
print(hold)

Submission status: Accepted

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

print((p-1)**2)

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()


n = int(arr_data[0][0])

res=math.sqrt(n)


print(int(math.pow(math.floor(res),2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
ans = 0
for i in range(1, 100000):
    if i**2 > n:
        break
    ans = i**2

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

for i in range(31623):
    if (N >= i**2) and (N < (i+1)**2):
        print(i**2)
        break
    else:
        pass

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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem B

if __name__ == '__main__':
    import math

    number = int(input())
    sqrt_number = int(math.sqrt(number))
    result = sqrt_number ** 2
    print(result)

Submission status: Accepted

Solution code:
from math import sqrt

base = int(sqrt(int(input())))

print(base * base)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
n = int(input())
while True:
  if math.sqrt(n) == math.floor(math.sqrt(n)):
    print(n)
    break
    
  n -= 1

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)

# Debug output
def chkprint(*args):
    names = {id(v):k for k,v in inspect.currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

# Binary converter
def to_bin(x):
    return bin(x)[2:]

# Set 2 dimension list
def dim2input(N):
    li = []
    for _ in range(N):
        li.append(list(map(int, input())))
    return li

# --------------------------------------------

dp = None

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

    ans = 0
    for i in range(math.ceil(N**0.5), 0, -1):
        if i * i <= N:
            ans = i * i
            break

    print(ans)

main()

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import math
n = int(input())
for i in range(n, 0, -1):
    square_root = int(math.sqrt(i))
    if i == square_root ** 2:
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

    num = 1
    for i in range(6):
        if N >= (10**i)**2 and N < (10**(i+1))**2:
            for j in range(10**i, 10**(i+1)):
               if j**2 > 10**9 or j**2 > N:
                   print (num)
                   return
               else:
                   num = j**2
               

    print (num)


if __name__ == "__main__":
    # global stime
    # stime = time.clock()
    main()

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())
a = 1
while(True):
    if(a * a > N):
        break
    a += 1
a = a - 1
print(a * a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

b = math.floor(math.sqrt(n))
print(b*b)

Submission status: Accepted

Solution code:
k = int(raw_input())
i = 1
while(i ** 2 <= k):
    i += 1

print (i-1)**2

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import pdb

def main():
    N = int(raw_input())
    answer = solve(N)
    print int(answer)

def solve(N):
    answer = np.floor(np.sqrt(N))**2
    return answer

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
print((lambda x:max([i*i for i in range(100001) if x>=i*i]))(int(input())))

Submission status: Accepted

Solution code:
import math

n = float(input())
n = math.floor(math.sqrt(n))

print(n*n)

Submission status: Accepted

Solution code:
import math
N = int(input())
sq = int(math.sqrt(N))
for i in range(max(0, sq-1), sq+2):
    x = i**2
    if x <= N:
        ans = x
print(ans)

Submission status: Accepted

Solution code:
import math

N=int(input())

T=1
for i in range(N,0,-1):
    T=math.sqrt(i)
    if T%int(T)==0:
        break

print(int(T)*int(T))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import math

N = float(input())
N = math.floor(math.sqrt(N))
print(N*N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = 0
r = n + 1

while l + 1 < r:
    m = l + (r - l) // 2
    if m**2 > n:
        r = m
    else:
        l = m
print(l**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

a = 1

while a**2 <= N:
    a+=1

print((a-1)**2)

Submission status: Accepted

Solution code:
import math


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

Submission status: Accepted

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

n=float(input())

x=math.sqrt(n)
x=math.floor(x)
print(x*x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a=int(input())

while 1:

    b=math.sqrt(a)

    if a%b==0:
        print(a)
        break
    elif a%b>0:
        a=a-1

Submission status: Accepted

Solution code:
Ns = input()
N = int(Ns)
o = 1

while(N >= (o * o)):
    o = o + 1

print((o - 1) * (o - 1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = float(input())

Nsqrt = int(math.sqrt(N))
ans = Nsqrt**2

print(ans)

Submission status: Accepted

Solution code:
a = int(input())
b = 0

for i in range(a+1):
    if(i*i < a or i*i == a):
        b = i
    else:
        break
        
print(b*b)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B,N = 0,1,int(input())
while (True):
	A += 1
	if A*A>N:
		break
	b = A*A     
print(b)

Submission status: Accepted

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

for i in range(n, 0, -1):
  if math.sqrt(i).is_integer():
    print(i)
    break

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    ans1 = 0
    n = 0
    while ans1 <= N:
        ans1 = n ** 2
        n += 1
 
    print((n - 2) **  2)
    
    
solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n = int(raw_input())
while True:
    if int(math.sqrt(n)) == math.sqrt(n):
        print n
        break
    else:
        n -= 1

Submission status: Accepted

Solution code:
a = int(input())

import numpy as np
b = int(np.sqrt(a))

print(b**2)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math

def main():
    N = int(input())
    max_sqrt = int(math.sqrt(N))
    print(max_sqrt * max_sqrt)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

while True:
	if int(N**(1/2)) == N**(1/2):
		break
	else:
		N -= 1
print(N)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC077B
import math

n=int(raw_input())
r=math.sqrt(n)
print int(r)**2

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    n = I()
    sq = math.sqrt(n)
    r = 1
    for i in range(int(sq)-2, int(sq)+2):
        if i**2 <= n and r < i**2:
            r = i**2

    return r



print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env ptyhon
 
import math
 
num=int(input())
 
for i in reversed(range(1, num+1)):
    rev=math.sqrt(i)
    # print(i,rev,int(rev))
    if( rev-int(rev) == 0 ):
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())
route = math.floor(math.sqrt(N))

print(route**2)

Submission status: Accepted

Solution code:
#coding: utf-8
import math

N = int(input())
x = math.sqrt(N)

print(int(x)**2)

Submission status: Accepted

Solution code:
N = int(input())
maxsq = 0
for i in range(N+1):
    if(i*i <= N):
        maxsq = i*i
    elif(i*i > N):
        break;
print(maxsq)

Submission status: Accepted

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

if a<=2: print("1")

Submission status: Accepted

Solution code:
N = int(input())

i = 1
sq = i * i
while sq <= N:
    i += 1
    temp = i * i
    if temp > N:
        break
    sq = temp

print(sq)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

x=1
while 1:
    if (x+1)**2>n:
        break
    x+=1
print(x**2)

Submission status: Accepted

Solution code:
import numpy

n = int(input())

for i in range(n):
    a = int(numpy.sqrt(n - i))
    b = n - i
    if a**2 == b:
        print(b)
        break
    else:
        pass

Submission status: Accepted

Solution code:
import sys
import random
import math

def rd():
        return sys.stdin.readline().rstrip()

def rdi():
        return [ int(x) for x in rd().split() ]

N, = rdi()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


def main():
    n = int(input())
    maxv = -1
    for x in range(1, int(math.pow(n, 1/2))+1):
        t = x**2
        if t > maxv and t <= n:
            maxv = t
    print(maxv)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n=int(raw_input())
for k in range(40000):
  if k**2>n:
    print (k-1)**2
    break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B_AroundSquare
import math

def around_square(N):
	i = int(math.sqrt(N))
	print(pow(i, 2))


N = int(input())
around_square(N)

Submission status: Accepted

Solution code:
import sys,collections,math 
sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
t = N
while 1:
    sqr = math.sqrt(t)
    if (sqr==int(sqr)):
        print(int(sqr**2))
        break
    else:
        t= t - 1

Submission status: Accepted

Solution code:
n = int(raw_input())
n = int(n**0.5);
print n*n

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")
 
 
def main():
    N = int(input())
    ans = 0
    for i in range(10**9):
        if i * i <= N:
            ans = max(ans, i * i)
        else:
            break
    print(ans)
 
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

def main():
    N = int(input())
    i = 0
    while True:
        if i ** 2 > N:
            return (i - 1)  ** 2
        i += 1
if __name__ == "__main__":
    print(main())

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def around_square(N):
    return int(N**(0.5))**2

N = int(input())
print(around_square(N))

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
INF = float("inf")


def main():
    N = int(input())
    ans = 0
    for i in range(10**9):
        if i * i <= N:
            ans = max(ans, i * i)
        else:
            break
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
a=int(N**0.5)

print(a**2)

Submission status: Accepted

Solution code:
from math import sqrt

def main():
	n = int(input())
	
	for i in reversed(range(n+1)):
	    if sqrt(i) - int(sqrt(i)) == 0:
	        print(i)
	        break
        
if __name__ == "__main__": main()

Submission status: Accepted

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

n=math.floor(math.sqrt(N))
print(n*n)

Submission status: Accepted

Solution code:
import math

n = int(input())

number = []
for i in range(1,n+1):
    if int(math.pow(i, 2)) > n:
        break
    else:
        number.append(int(math.pow(i, 2)))

print(max(number))

Submission status: Accepted

Solution code:
import math
n = int(input())
n_sqrt = math.sqrt(n)
max_n = 0

for i in range(int(n_sqrt) + 1):
    if i ** 2 <= n and i ** 2 > max_n:
        max_n = i

print(max_n ** 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

k = 1
while k**2 <= n:
    ans = k**2
    k += 1
print(ans)

Submission status: Accepted

Solution code:
import sys

DBG_FLAG = 0

def p_dbg(str):
    if(DBG_FLAG == 1):
        sys.stdout.flush()
        print str

# 1st. get Num

Num = int(raw_input())

p_dbg('Num : ' + str(Num))

square_max = 1

# MEMORY OVER
# for i in range(1, Num):
#     tmp = i * i
#     p_dbg(str(i) + str(square_max))
#     if(tmp <= Num):
#         square_max = tmp
#     else:
#         break

i = 1
tmp = 1
while tmp <= Num:
    p_dbg(str(i) + ':' + str(square_max))
    square_max = tmp
    tmp = i*i
    i = i+1

print square_max

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

    Sn = [] #Square numbers
    i = 1
    while 1:
        if i ** 2 <= N:
            Sn.append(i ** 2)
            i += 1
        else:
            break

    print(Sn[-1])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# coding: utf-8

def main():
    n = input()
    l = []
    for i in xrange(1, n+1):
        s = i ** 2
        l.append(s)

        if s > n:
            print l[-2]
            return

    print 1

main()

Submission status: Accepted

Solution code:
import sys
import math

n = int(input())

root = math.floor(math.sqrt(n))
print(int(root * root))

Submission status: Accepted

Solution code:
import math

a = int(input())

ans = int(math.sqrt(a))
print(ans**2)

Submission status: Accepted

Solution code:
import math

n = int(input())
ans =1
for i in range(n,0,-1):
    if isinstance(math.sqrt(i),float) and math.sqrt(i) == int(math.sqrt(i)):
        ans = i
        break
print(ans)

Submission status: Accepted

Solution code:
N = int(input().strip())
 
count = 0
while True:
    if (count + 1) ** 2 > N:
        print(count ** 2)
        break
    count += 1

Submission status: Accepted

Solution code:
from math import *
n = input()

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

Submission status: Accepted

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

print(sq)

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())

a = []

for i in range(n) :
    if (i+1)**2 <= n:
      a.append((i+1)**2 )
    else:
      break

print(a[-1])

Submission status: Accepted

Solution code:
import math

a = int(input())
b = math.floor(math.sqrt(a))
print(b*b)

Submission status: Accepted

Solution code:

a = int(input())
import math
def Bround(a):
    while True:
        s = math.floor(math.sqrt(a))
        if s * s == a:
            return a
        else:
            a -= 1
print(Bround(a))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
import numpy
N = int(input())
X = numpy.sqrt(N)

print(int(X)*int(X))

Submission status: Accepted

Solution code:
#!/user/bin/python
# coding: UTF-8

N = int(raw_input())
n = 1

while n * n <= N :
    n = n + 1

print (n - 1) * (n - 1)

Submission status: Accepted

Solution code:
import math

a = int(input())
for n in range(a):
    #print(a-n)
    if math.sqrt(a-n) == int(math.sqrt(a-n)):
            break

print(a-n)

Submission status: Accepted

Solution code:
import math
row1=int(raw_input())
#print row1
while True:
    arg=math.sqrt(row1)
    if arg == int(arg):
        output=row1
        break
    row1-=1
print output

Submission status: Accepted

Solution code:
def B_Around_Square(N):
    ans=[]
    tmp=0
    while tmp**2<=N:
        ans.append(tmp**2)
        tmp+=1
    return ans[-1]

N = int(input())
print(B_Around_Square(N))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
n = int(input())

for num in range(100000):
    if pow(num,2) > n:
        print (pow(num-1,2))
        break

Submission status: Accepted

Solution code:
import math

N = int(input())
for i in range(N):
    y = math.sqrt(N-i)
    if int(y) == y:
        print(N-i)
        break