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:
N = int(input())

sqlist = [i**2 for i in range(40000,0,-1)]

for i in sqlist:
  if i <= N:
    print(i)
    exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
N=int(stdin.readline().rstrip())
print(int(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:
n = int(input())
ans = 1
for i in range(1,n+1):
    if i **2 > n:
        ans = (i-1) ** 2
        break
print(ans)

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
print(pow(int(math.sqrt(int(input()))), 2))

Submission status: Accepted

Solution code:
n = int(input())
l = -1
for i in range(100000):
    if n < i*i:
        print( (i - 1) * (i - 1) )
        break

Submission status: Accepted

Solution code:
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
# import statistics
import bisect
import copy
import fractions
import math
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) 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 MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))
def unite(x, y):
    # それぞれのノードの根を求める
    x = root(x)
    y = root(y)
    if x == y:
        return
    # node[x]の根をyに変更する
    node[x] = y
def same(x,y): return bool(root(x) == root(y))
def root(x):
    if node[x] == x:  # xが根の場合
        return x
    else:
        node[x] = root(node[x])  # 経路圧縮
        return node[x]
def dfs(v):
    # ノードに訪れた
    visited[v] = True
    for v2 in range(n):
        if graph[v][v2] == False:  # そもそもvとv2が辺でつながっていない
            continue
        if visited[v2] == True:  # もう見た
            continue
        dfs(v2)


n = II()
ans = 1
if n == 1:
    print(1)
    exit()
for i in range(1, n+1):
    ans = i ** 2
    if ans > n:
        print((i-1) ** 2)
        exit()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
square_number_list = []
number_max = int(N**(1/2))

for i in range(1,number_max + 1):
    square_number = i ** 2
    square_number_list.append(square_number)
print(max(square_number_list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
i = 1

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc077/tasks/abc077_b
N = int(input())
for i in range(1,10**5):
    if i*i <= N:
        continue
    else:
        print((i-1)*(i-1))
        break

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

# 入力
N=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

tmp = 1

for i in range(1,pow(10,9)):
    tmp = pow(i,2)
    if tmp > n:
        print(pow(i-1,2))
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
from functools import partial, reduce
from operator import mul
prod = partial(reduce, mul)
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 II(): return int(sys.stdin.readline())
def SI(): return input()

fibo = [1, 1]
for i in range(2, 9):
    fibo.append(fibo[i - 1] + fibo[i - 2])

def main():
    N = II()
    ans = int(N ** 0.5) ** 2
    return ans

print(main())

Submission status: Accepted

Solution code:
x = int(input())
res = 0
i = 0

while res <= x:
  i += 1
  res = i ** 2

print((i-1)**2)

Submission status: Accepted

Solution code:
x = int(input())
print(int(x**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())
for i in range(n+1):
  m = (i+1) ** 2
  if m > n:
    print(i**2)
    break

Submission status: Accepted

Solution code:
n=int(input())

a=n

for i in range(n):
  if (float.is_integer(a**0.5)):
    print(a)
    break
  else:
    a=a-1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
upp = int(N**0.5)
print(upp**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)
        break
    else:
        continue

Submission status: Accepted

Solution code:
N=int(input())
for i in range(1,N+2): #N+2なのはNが1の場合のときのため
	if i**2<=N: Key=i**2
	else: 
		print(Key)
		break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def hantei(n):
  seisu = int(n**.5)
  if n == seisu*seisu:
    return True
  else:
    return False

N = int(input())
for i in range(1, N+1)[::-1]:
  if hantei(i):
    break
print(i)

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for i in range(10**5):
    x=i**2
    if n>=x:
        ans=x
    else:
        break
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
import math

def main():
    # 文字列の2進数を数値にする
    # '101' → '5'
    # 文字列の頭に'0b'をつけてint()にわたす
    # binary = int('0b'+'101',0)

    # 2進数で立っているbitを数える
    # 101(0x5) → 2
    # cnt_bit = bin(5).count('1')
    
    # N! を求める
    # f = math.factorial(N)

    # N の逆元
    # N_inv = pow(N,MOD-2,MOD)

    # nCr
    # Nの階乗 * rの階乗の逆元 * n-rの階乗の逆元
    
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    INF = float("inf")

    # 大きな素数
    MOD = 10**9+7
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]    
    N = int(input())
    N2 = math.floor(math.sqrt(N))
    print(N2**2)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#coding:utf-8

a = int(input())
i=0
while i*i <= a:
  i=i+1

i=i-1

print(i*i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


def solve(n):
  ret = 1
  while True:
    if (ret+1)**2 > n:
      return ret**2
    else:
      ret += 1

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

Submission status: Accepted

Solution code:

import math


def read_input():
    n = int(input())
    return n

def submit():
    n = read_input()

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

if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    n = f()[0]
    x = int(n**0.5)
    print(x*x)

solve()

Submission status: Accepted

Solution code:
import math
n=int(input())
while  math.ceil(n**0.5) != math.floor(n**0.5):
      n=n-1

print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())

mp = int(np.sqrt(N))
print(mp**2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
for i in range(N + 1)[::-1]:
    sqrt = int(i ** (1 / 2))
    if sqrt ** 2 == i:
        print(i)
        break

Submission status: Accepted

Solution code:
import sys
from collections import Counter

n = int(input())

for i in range(n, 0, -1):
    if pow(i, 0.5) % 1 == 0:
        print(i)
        sys.exit()

Submission status: Accepted

Solution code:
# ABC077B - Around Square
from math import floor
n = int(input())
print(floor(pow(n, 0.5)) ** 2)

Submission status: Accepted

Solution code:
import numpy as np
import math

print(math.floor((int(input())**(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:
# -*- coding utf-8 -*-
n=int(input())
x=0
while x**2<=n:
    x+=1

print((x-1)**2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-
n=int(input())
x=1

while (x+1)**2<=n:
    x+=1
print(x**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:
N = int(input())
x = 1
while (x+1)**2 <= N:
    x += 1
print(x**2)

Submission status: Accepted

Solution code:
N = int(input())

m = 1
for i in range(1, N):
    if i**2 > N:
        break
    m = i**2
print(m)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
N = int(input())

i = 1
add = 3
while i + add <= N:
    i += add
    add += 2

print(i)

Submission status: Accepted

Solution code:
n = int(input())

def ex_value(value):
	i = 1
	while value >= i**2:
		i += 1
	return (i-1) ** 2

print(ex_value(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print((n-1)**2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
tmp=0
while True:
    if tmp**2<=n:
        tmp+=1
    else:
        break

print((tmp-1)**2)

Submission status: Accepted

Solution code:
N = int(input())

if 1 == N:
	print(1)
	exit()

vsum = 0
for i, v in enumerate(range(1, N * 2, 2)):
	#print(i, v, vsum)
	vnext = vsum + v
	if N < vnext:
		print(i**2)
		break
	vsum = vnext

Submission status: Accepted

Solution code:
N = int(input())
for i in range(10 ** 5):
    if i ** 2 <= N:
        continue
    else:
        print((i - 1) ** 2)
        break

Submission status: Accepted

Solution code:
N = int(input())
sq = [i ** 2 for i in range(10 ** 5) if i ** 2 <= N]
print(sq[-1])

Submission status: Accepted

Solution code:
import math
N=int(input())
for i in range(1,100000):
    if i*i>N:
        key=i
        break
        
print((key-1)*(key-1))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
heihousu = []
s = 0
t = 0
while (t <= N):
    s += 1
    t = s**2
    heihousu.append(t)
print(heihousu[-2])

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for i in range(int((n-1)**0.5), int(n**0.5)+1):
    ans = max(ans, i ** 2)

print(ans)

Submission status: Accepted

Solution code:
a = []
import bisect
for i in range(1,10**5+1):
    if i ** 2 > 10**9:
        break
    a.append(i**2)

n = int(input())
x = bisect.bisect_right(a,n)
print(a[x-1])

Submission status: Accepted

Solution code:
import math
n=int(input())
for i in range(n,-1,-1):
  num=math.floor(math.sqrt(i))
  if num**2==i:
    break
print(i)

Submission status: Accepted

Solution code:
N = int(input().strip())

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

Submission status: Accepted

Solution code:
n = int(raw_input())
print int(n**0.5)**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:
import math

N = int(input())

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

print(int(x*x))

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
import math
a=math.floor(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:
from sys import exit
# A,B,C = [int(n) for n in input().split()]
N = int(input())
# a = [int(input()) for _ in range(N)]
anss = 1
for i in range(1,N+1):
    if(i**2>N):
        anss = i-1
        break
print(anss**2)

Submission status: Accepted

Solution code:
import math

N = int(input())
for i in range(1,N+1)[::-1]:
    num = math.sqrt(i)
    if num == int(num):
        print(i)
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor, sqrt


def solve(string):
    return str(floor(sqrt(int(string)))**2)


if __name__ == '__main__':
    print(solve(input()))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
for i in range(n, 0, -1):
    m = int(i**.5)
    if abs(m*m-i) < 1e-6:
        print(i)
        break

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

for i in range(100000):
    if i * i > n:
        print((i-1)*(i-1))
        break

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ans=1
before=1
while 1:  
  hoge=ans**2
  if(n<hoge):
    break
  before=hoge
  ans+=1
  
print(before)

Submission status: Accepted

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

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())
ans = [i*i for i in range(math.ceil(math.sqrt(N))+1) if i * i <= N]
print(ans[-1])

Submission status: Accepted

Solution code:
#87
import math
n = int(input())
while math.sqrt(n)//1 != math.sqrt(n):
    n -= 1
print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 077 B
import numpy as np

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

Submission status: Accepted

Solution code:
# 077 B
import numpy as np

N = int(input())
print(int(np.sqrt(N)) * int(np.sqrt(N)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
ans = int(math.sqrt(N))
print(ans**2)

Submission status: Accepted

Solution code:
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
ans = [pow(i,2) for i in range(100000) if pow(i,2)<=N]
print(ans[-1])

Submission status: Accepted

Solution code:
import math
N = int(input())
while True:
    if math.sqrt(N) % 1 == 0:
        break
    N -= 1
print(N)

Submission status: Accepted

Solution code:
N = int(input())
nums = 0
for i in range(1, 100000):
    if i**2 <= N:
        nums = i
print(nums**2)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc077/tasks/abc077_b

import itertools
import collections
import bisect

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
square=[]
for i in range(32000,0,-1):
  square.append(i*i)
n=int(input())
for i in range(32000):
  if n>=square[i]:
    print(square[i])
    exit()

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:
N = int(input())

ans = 0
from math import sqrt
for i in range(int(sqrt(N)), 0, -1):
    if i * i <= N:
        ans = i * i
        break

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
num = 0
for i in range(1,100000000):
    if i*i> N:
        break
    else:
        num = i*i
print(num)

Submission status: Accepted

Solution code:
n =int(input())

max_sq = 0
c = 0

l = []


for i in range(1,n+1):
	if   i*i <= n:
		l.append(i*i)
	if i*i > n:
		break      
        
print(max(l))

Submission status: Accepted

Solution code:
import math
N=int(input())
i=0
while True:
  if math.sqrt(N-i)==int(math.sqrt(N-i)):
    print(int(N-i))
    break
  else:
    i+=1

Submission status: Accepted

Solution code:
def around_square(N: int) -> int:
    n = 1
    while (n+1)*(n+1) <= N:
        n += 1
    return n * n


if __name__ == "__main__":
    N = int(input())
    ans = around_square(N)
    print(ans)

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    a = int(N**0.5)
    print(a**2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
square = [i*i for i in range(1, int(N**0.5)+1)]
print(max(square))

Submission status: Accepted

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

x -= 1
print(x * x)

Submission status: Accepted

Solution code:
import bisect

n = int(input())
x = list(map(lambda x:x*x, list(range(40000))))

idx = bisect.bisect_right(x,n)
print(x[idx-1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
a=[]
for i in range(n+1)[::-1]:
    b=pow(i,0.5)
    if b==b//1:
        print(int(i))
        break

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from heapq import heappush, heappop
import sys
import math
import bisect
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return list(sys.stdin.readline())
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
mod = 1000000007

#A
"""
a = input()
b = input()
if a[2] == b[0] and a[1] == b[1] and a[0] == b[2]:
    print("YES")
else:
    print("NO")
"""

#B
n = I()
n = int(math.sqrt(n))
print(n**2)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

#A
def A():
    s = S()
    t = S()
    if s+t == t[::-1]+s[::-1]:
        print("YES")
    else:
        print("NO")

#B
def B():
    n = I()
    for i in range(int(n**0.5)+2)[::-1]:
        if i*i <= n:
            print(i*i)
            quit()
#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == "__main__":
    B()

Submission status: Accepted

Solution code:
import math

def A():
    a, b = [int(x) for x in input().split()]
    print(math.ceil((a + b)/2))

def B():
    a = ''.join(sorted(list(input()), key=lambda x:ord(x)))
    b = ''.join(sorted(list(input()), key=lambda x:-ord(x)))
    if a < b:
        print('Yes')
    else:
        print('No')

def C():
    N = input()
    A = [x for x in input().split()]
    counter = {}

    for a in A:
        if(a in counter):
            counter[a] += 1
        else:
            counter[a] = 1
    remove_count = 0
    for key in counter:
        if counter[key] - int(key) >= 0:
            remove_count += counter[key] - int(key)
        else:
            remove_count += counter[key]
    print(remove_count)

def E():
    s1 = input()
    s2 = input()
    if s1 == s2[::-1]:
        print('YES')
    else:
        print('NO')

def F():
    a = int(input())
    sqrt = math.floor(math.sqrt(a))
    print(sqrt*sqrt)
F()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
maxnum = 0
for i in range(1,100000000):
    if i*i>N:
        break
    else:
        maxnum = i*i
print(maxnum)

Submission status: Accepted

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

Submission status: Accepted

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

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())
print((math.floor(math.sqrt(N)))**2)

Submission status: Accepted

Solution code:
a = int(input())

ans = 1
while a >= ans * ans:
    ans += 1
ans -= 1
print(ans * ans)

Submission status: Accepted

Solution code:
import math


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from math import sqrt
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

N = int(input())
ma = int(sqrt(N))
if ma*ma <= N:
    print(ma**2)
else:
    print((ma-1)**2)

Submission status: Accepted

Solution code:
""" AtCoder """

N = int(input())

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

print(N**2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

INF=1e18
MOD=1e9+7

N=int(input())

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

Submission status: Accepted

Solution code:
# coding: utf-8
from math import sqrt
N = int(input())
print(int(sqrt(N))**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())
for i in range(1,N+1):
  if i**2>N:
    break
  answer=i**2
print(answer)

Submission status: Accepted

Solution code:
N = int( input() )

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

Submission status: Accepted

Solution code:
N = int( input() )

ans = 0
for i in range( int(N**0.5)+1 ):
    ans = max( ans, i*i )

print( ans )

Submission status: Accepted

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

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())
i=1
res = 0
while i*i<=n:
    res = i*i
    i+=1
print(res)

Submission status: Accepted

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

Submission status: Accepted

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