TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())

for x in  range(1,10):
  for y in range(1,10):
    if x*y == n:
      print("Yes")
      break
  break
  
else:
  print("No")


n = int(input())

a = False

for x in  range(1,10):
  for y in range(1,10):
    if x*y == n:
      print("Yes")
      a = True
      break
  if a:
    break

else:
  print("No")


Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            if i < 10:
              divisors.append(i)
            if i != n // i:
                if n // i < 10:
                  divisors.append(n//i)

    
    return divisors
  
a = make_divisors(n)

f = False
for i in range(len(a)):
  for j in range(len(a)):
    if a[i] * a[j] == n:
      print("Yes")
      f = True
      
if not f:
	print("No")

n = int(input())

kuku = []
for i in range(1, 10):
  for j in range(1, 10):
    kuku.append(i*j)
    
if n in kuku:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())
list = [1,2,3,4,5,6,7,8,9,10,12,14,16,18,15,21,24,27,20,28,32,36,25,35,40,45,30,42,48,54,49,56,63,64,72,81]
for N in list:
  print("Yes")
else:
  print("NO")

N = int(input())
list = [1,2,3,4,5,6,7,8,9,10,12,14,16,18,15,21,24,27,20,28,32,36,25,35,40,45,30,42,48,54,49,56,63,64,72,81]
if N in list:
  print("Yes")
else:
  print("No")


Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n =int(input())


for i in range(2,10):
  if n%i==0 and 1<n/i<10: 
    print("YES")
    exit()
    
print("NO")

n =int(input())

if n<10:
  print("YES")
  exit()

for i in range(1,10):
  if n%i==0 and 0<n/i<10:
    print("YES")
    exit()
    
print("NO")

n =int(input())


for i in range(1,10):
  if n%i==0 and 1<n/i<10: 
    print("YES")
    exit()
    
print("NO")

n =int(input())
if n<10:
  print("Yes")
  exit()

for i in range(2,10):
  if n%i==0 and 1<n/i<10: 
    print("Yes")
    exit()
    
print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
list=[]
 for i in range(1,10):
    for j in range(1,10):
      list.append(i*j)
a=int(input())
if a in list:
  print('Yes')
else:
  print('No')

list=[]
for i in range(1,10):
   for j in range(1,10):
      list.append(i*j)
a=int(input())
if a in list:
  print('Yes')
else:
  print('No')

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())
for i in range(1,10):
  if N % i == 0 and N//i >= 1 and N//i <= 9:
    print("Yes")
    break
print("No")

n=int(input())
for i in range(1,10):
  if n%i==0 and 1<=n/i<=9:
    print('Yes')
    break
  else:
    print('No')

n=int(input())
for i in range(1,10):
  if n%i==0 and 1<=n//i<=9:
    print('Yes')
print('No')

N = int(input())
for i in range(1,10):
  if N % i == 0 and N//i >= 1 and N//i <= 9:
    print("Yes")
    exit()
  else:
    print("No")

n=int(input())
for i in range(1,10):
  if n%i==0 and 1<=n/i<=9:
    print('Yes')
    quit
  else:
    print('No')

N = int(input())
for i in range(1,10):
  if N % i == 0 and N//i >= 1 and N//i <= 9:
    print("Yes")
    exit()
  else:
    print("No")

n=int(input())
for i in range(1,10):
  if n%i==0 and 1<=n/i<=9:
    print('Yes')
  else:
    print('No')

N = int(input())
for i in range(1,10):
  if N % i == 0 and N//i >= 1 and N//i <= 9:
    print("Yes")
    break
  else:
    print("No")

N = int(input())
for i in range(1,10):
  if N % i == 0 and N//i >= 1 and N//i <= 9:
    print("Yes")
    exit()
  print("No")

n=int(input())
for i in range(1,10):
  if n%i==0 and 1<=n//i<=9:
    print('Yes')
    exit()
print('No')

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())
ans = 0
for i in range(1,10):
    for j in range(1,10):
        if n == (i*j):
            ans = 1
            break
if ans == 1:
    print('YES')
else:
    print('NO')

n = int(input())
count = 0

for i in range(10):
    for j in range(10):
        if i*j == n:
            print('Yes')
            exit()
print('No')

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N=int(input().split())

ans=False
for i in range(9):
  for j in range(9):
    if i*j==N:
      ans=True
      break
print(("No","Yes")[ans])

N=int(input())

ans=False
for i in range(1,10):
  for j in range(1,10):
    if i*j==N:
      ans=True
      break
print(("No","Yes")[ans])


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())
A = 0
for i in range(1,10):
  for j in range(1,10):
    x = i * j
      if x == n:
        A += 1
if A >= 1:
  print("Yes")
else:
  print("No")

n = int(input())
A = 0
for i in range(1,10):
  for j in range(1,10):
    x = i * j
    if x == n:
      A += 1
if A >= 1:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
a=int(input())
s=[]
for i in range(9):
    for j in range(9):
        s.append((i+1)*(i+1))
if a in s:
    print('Yes')
else:
    print('No')

a=int(input())
s=[]
for i in range(9):
    for j in range(9):
        s.append((i+1)*(j+1))
if a in s:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N=int(input())
if N >81:
  print("No")
else:
  for i in range(1,9):
    a=N/i
    b=N/i
    a=(isinstance(i, int))
    if a == True and b < 10:
      print("Yes")
      break
    else:
      print("No")
      break

N=int(input())
if N >81:
  print("No")
else:
  for i in range(1,9):
    a=N/i
    b=(a.is_integer())
    if a<10 and b==True:
      print("Yes")
      break
  for i in range(1,9):
    c=N/i
    d=(c.is_integer())
    if d==False:
      print("No")
      break

import sys
N=int(input())
if N >81:
  print("No")
  sys.exit()
if N==81:
  print("Yes")
else:
  for i in range(1,9):
    a=N/i
    b=(a.is_integer())
    if a<10 and b==True:
      print("Yes")
      break
  else:
    for i in range(1,9):
      c=N/i
      d=(c.is_integer())
      if d==False:
        print("No")
        break

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())
for i in range(1, 10):
  a = N // i
  if N % 1 == 0 and 1 <= a and a <= 9:
    print("Yes")
print("No")

N = int(input())
for i in range(1, 10):
  a = N // i
  if N % i == 0 and 1 <= a and a <= 9:
    print("Yes")
    exit()
print("No")


Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n=int(input())
a=0
for i in range(9):
  for j in range(9):
    if n==(i+1)*(j+1):
      print("yes")
      a+=1
      break
  if a!=0:
    break
if a==0:
  print("no")

n=int(input())
a=0
for i in range(9):
  for j in range(9):
    if n==(i+1)*(j+1):
      print("Yes")
      a+=1
      break
  if a!=0:
    break
if a==0:
  print("No")


Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())
for i in range(1,9):
  for j in range(1,9):
    if i*j==N:
      print("yes")
      exit()
print("No")

N = int(input())
for i in range(9):
  for j in range(9):
    if (i+1)*(j+1)==N:
      print("yes")
      exit()
print("No")

N = int(input())
for i in range(1,10):
  for j in range(1,10):
    if i*j == N:
      print('Yes')
      exit()
print('No')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n = int(input())

tmp = prime_factorize(n)

if n = 1 or len(tmp) != 0:
  print("Yes")
else:
  print("No")

n = int(input())
frag = 0

for i in range(1, 10):
  if n / i <= 9 and n % i == 0:
    frag = 1

if frag:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())

q = 0

for i in range(10):
    for s in range(10):
        if i*s == n:
            q = 1
            print("Yes")
            break
if q == 0:
    print("No")

n = int(input())

q = 0

for i in range(10):
    for s in range(10):
        if i*s == n:
            q = 1
            print("Yes")
            break
        break
if q == 0:
    print("No")

n = int(input())

q = 0

for i in range(10):
    for s in range(10):
        if i*s == n:
            q = 1
            print("Yes")
            break
    if q == 1:
        break
if q == 0:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
"""
int(input())
map(int,input().split())
list(map(int,input().split()))

"""

x=map(int,input().split())
ans="No"
for  i  in range(1,10):
    for j in range(1,10):
        if(i*j==x):
            ans="Yes"
print(ans)

"""
int(input())
map(int,input().split())
list(map(int,input().split()))

"""

x=int(input())
ans="No"
for  i  in range(1,10):
    for j in range(1,10):
        # print(i,j,x)
        if((i*j)==x):
            ans="Yes"
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n=int(input())
for i in range(10):
    for s in range (10):
        result=i*s
        if n==result:
            print('Yes')
            break
        elif result<81:
            continue
        else:
            print('No')

n=int(input())
for i in range(10):
    for s in range (10):
        result=i*s
        if n==result:
            print('Yes')
            exit()
        elif result<81:
            continue
        else:
            print('No')

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
i = int(input())
flag = False
for x in range(1, 10):
  for y in range(1, 10):
    print(x, y)
    if x * y == i:
      flag = True
      break

if flag:
  print('Yes')
else:
  print('No')

i = int(input())
flag = False
for x in range(1, 10):
  for y in range(1, 10):
    if x * y == i:
      flag = True
      break
 
if flag:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N=int(input())

x=[]
for i in range(1,10):
    if (N/i).is_integer()==True and (N/i)<10 :
        print(N/i)
        x.append('Yes')
        break

if 'Yes' in x:
    print('Yes')
else:
    print('No')

N=int(input())

b=[i for i in range(1,10)]
c=[]

for i in b:
    for j in b:
        c.append(i*j)

N in set(c) 


N=int(input())

b=[i for i in range(1,10)]
x=[]
for i in b:
    if (N/i).is_integer()==True and (N/i)<10 :
        print(N/i)
        x.append('Yes')
        break

if 'Yes' in x:
    print('Yes')
else:
    print('No')

N=int(input())

b=[i for i in range(1,10)]
c=[]

for i in b:
    for j in b:
        c.append(i*j)

if N in set(c) :
  print('Yes')
else:
  print('No')


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n=int(input())
if n<=81:
  for i in range(1,10):
    if n%i==0 and n//i<10:
      print('Yes')
    else:
      print('No')
    exit()

  
else:
  print('No')

n=int(input())
a=[]
for i in range(1,10):
  for j in range(i,10):
    a.append(i*j)
print('Yes' if (n in a) else 'No')

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n=int(input())

list=[]

for i in range(1,10)
	for j in range(1,10)
		list.append(i*j)
    
if n in list:
	print("Yes")
else:
	print("No")

n=int(input())
 
list=[]
 
for i in range(1,10):
	for j in range(1,10):
		list.append(i*j)
    
if n in list:
	print("Yes")
else:
	print("No")


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N=int(input())
ku={}
for i in range(9):
  for j in range(9):
    ku.add((i+1)*(j+1));
if N in ku:
  print("Yes")
else:
  print("No")
    

N=int(input())
ku=[]
for i in range(9):
  for j in range(9):
    ku.append((i+1)*(j+1));
if N in ku:
  print("Yes")
else:
  print("No")
    


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
import sys

N =int(input())

for a in range(1,10):
  for b in range(1,10):
    if a*b == N:
      print('yes')
      sys.exit()
print('no')

import sys

N =int(input())

for a in range(1,10):
  for b in range(1,10):
    if a*b == N:
      print('Yes')
      sys.exit()
print('No')

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())

flag = 0
for i in range(1, 10):
    m = n/i
    try:
        m = int(m)
        if m < 10:
          flag = 1
            print("Yes")
            break
    except:
        continue
if flag ==0:
    print("No")

def is_integer_num(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False
  
n = int(input())

flag=0
for i in range(1, 10):
    m = n/i
    if is_integer_num(m) and m<10:
        flag = 1
        print("Yes")
        break
if flag == 0:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())

for A in range(1, 10):
    for B in range(1, 10):
        if N == A*B:
            print('Yes')
            True
            break
if False:
  print('No')

n = int(input())

for i in range(1, 10):
    tmp = (n / i)
    if tmp.is_integer() and 1<=tmp and tmp <=9:
        print("Yes")
        exit()
print("No")

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
import fractions
import math
import os

input = sys.stdin.readline

n = int(input())

for i in range(1,9):
    if n%i==0:
        if n//i<=9:
            print("Yes")
            exit()
print("No")


import sys
import math
import os

input = sys.stdin.readline

n = int(input())

for i in range(1,10):
    if n%i==0:
        if n//i<=9:
            print("Yes")
            exit()
print("No")


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())

for n in (range(1,10)):
  print(n)
  if N%n ==0:
    if 1 <= N/n <= 9:
      print('Yes')
      import sys
      sys.exit()
  else:
    print('No')

N = int(input())

for n in (range(1,10)):
  if N%n ==0:
    if 1 <= N/n <= 9:
      print('Yes')
      import sys
      sys.exit()

print('No')


Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())

c = 0
for i in range(1,10):
  for j in range(1,10):
    if i*j == N:
      print('Yes')
      break
    else:
      c += 1
if c == 81:
  print('No')

N = int(input())

c = 0
for i in range(1,10):
  for j in range(1,10):
    if i*j == N:
      c += 1
if c >= 1:
  print('Yes')
else:
  print('No')
      

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
arr = []
for i in range(1, 10):
  for j in range(1, 10):
     arr.append(i * j)
n = int(input())
if n in arr:
  print('YES')
else:
  print('NO')

arr = []
for i in range(1, 10):
  for j in range(1, 10):
     arr.append(i * j)
n = int(input())
if n in arr:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())

num = [1, 2, 3, 4, 5, 6, 7, 8, 9]

ans = 0
for i in range(9):
    for j in range(9):
        if n%num[i] == 0 and n%num[j] == o and n//(num[i]) == num[j]:
            ans = 1
if ans == 1:
    print("Yes")
else:
    print("No")

n = int(input())

num = [1, 2, 3, 4, 5, 6, 7, 8, 9]

ans = 0
for i in range(9):
    for j in range(9):
        if n%num[i] == 0 and n%num[i] == 0 and n//(num[i]) == num[j]:
            ans = 1
if ans == 1:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
for i in range(1, 10):
  for k in range(1,10):
    if N == i * k:
      print("Yes")
      sys.exit()
print("No")

import sys
N = int(input())

for i in range(1, 10):
  for k in range(1,10):
    if N == i * k:
      print("Yes")
      sys.exit()

print("No")

Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())
A = ""
for i in range(1,10):
    for j in range(1,10):
        if (N%i==0) and (N%j==0):
            A ="Yes"
            break
        else:
            A ="No"
print(A)
            

N = int(input())
for i in range(1, 10):
  for j in range(1, 10):
    if(i*j==N):
      print('Yes')
      break
  else:
    continue
  break
else:
  print('No')


Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
input = int(input())
for i in range(1, 10):
  for j in range(1, 10):
    if i*j==input:
      print("Yes")
    else:
      print("No")

input = int(input())
for i in range(1, 10):
  for j in range(1, 10):
    if i*j==input:
      print("Yes")
      break
    else:
      continue

input = int(input())
for i in range(1, 10):
  for j in range(1, 10):
    if i*j==input:
      print("Yes")
      exit()
    else:
      continue
print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())
for i in range(1,10):
    if n % i == 0:
        print("Yes")
        break
print("No")

n = int(input())
for i in range(1,10):
    if n % i == 0 and 1<=n//i <=9:
        print("Yes")
        break
print("No")

import sys
n = int(input())
for i in range(1,10):
    if n % i == 0 and 1<=n//i <=9:
        print("Yes")
        sys.exit(0)
print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n=int(input())
s=[0]*81
for i in range(1,10):
  for j in range(1,10):
    s[i+j]=i*j
p=81
for k in range(1,81):
  if s[k]==n:
    p=p-1
if p==81:
  print('No')
else:
  print('Yes')

n=int(input())
s=[0]*100
for i in range(1,10):
  for j in range(1,10):
    s[10*i+j]=i*j
p=81
for k in range(1,101):
  if s[k]==n:
    p=p-1
if p==81:
  print('No')
else:
  print('Yes')


n=int(input())
s=[0]*100
for i in range(1,10):
  for j in range(1,10):
    s[10*i+j]=i*j
p=81
for k in range(0,100):
  if s[k]==n:
    p=p-1
if p==81:
  print('No')
else:
  print('Yes')


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())
qq = 0

for i in range(9):
    for j in range(9):
        if (i + 1) * (j + 1) == n:
            print("Yes")
            qq = (i + 1) * (j + 1)

if qq == 0:
    print("No")

import sys

n = int(input())
qq = 0

for i in range(9):
    for j in range(9):
        if (i + 1) * (j + 1) == n:
            print("Yes")
            qq = (i + 1) * (j + 1)
            sys.exit()

if qq == 0:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N=input()
N=int(N)
A=1
B=1
flag=0
if N>81:
  flag=0
elif N<1:
  flag=0
else:
  for A in range(10):
    for B in range(10):
      if N==A*B:
        flag=1
      else:
        flag=0
if flag==0:
  print('NO')
else:
  print('YES')

N=int(input())
flag=0
for A in range(1,10):
  for B in range(1,10):
    if N==A*B:
      flag=1
      break
      
if flag==0:
  print('NO')
else:
  print('YES')

N=input()
N=int(N)
A=1
B=1
flag=0
if N>81:
    flag=0
else:
    for A in range(10):
    for B in range(10):
        if N==A*B:
        flag=1
    else:
        flag=0
if flag==0:
    print('NO')
else:
    print('YES')


N=int(input())
A=1
B=1
flag=0
for A in range(1,10):
  for B in range(1,10):
    if N==A*B:
      flag=1
      break
if flag==0:
  print('NO')
else:
  print('YES')

N=int(input())
flag=0
for A in range(1,10):
  for B in range(1,10):
    if N==A*B:
      flag=1
      break
      
if flag==0:
  print("NO")
else:
  print("YES")

N=input()
N=int(N)

#N=A*B
A=1
B=1
flag=0
if N>81:
  flag=0
else:
  for A in range(10):
    for B in range(10):
      if N==A*B:
        flag=1
      else:
        flag=0
if flag==0:
  print('NO')
else:
  print('YES')

N=input()
N=int(N)
A=1
B=1
flag=0
if N>81:
    flag=0
elif N<1:
    flag=0
else:
    for A in range(10):
        for B in range(10):
            if N==A*B:
                flag=1
            else:
                flag=0
if flag==0:
    print('NO')
else:
    print('YES')

N=int(input())
flag=0
for A in range(1,10):
  for B in range(1,10):
    if N==A*B:
      flag=1
      break
      
if flag==0:
  print('NO')
else:
  print('YES')

N=input()
N=int(N)
A=1
B=1
flag=0
if N>81:
  flag=0
elif N<1:
    flag=0
else:
  for A in range(10):
    for B in range(10):
      if N==A*B:
        flag=1
      else:
        flag=0
if flag==0:
  print('NO')
else:
  print('YES')

N=int(input())
flag=0
for A in range(1,10):
  for B in range(1,10):
    if N==A*B:
      flag=1
      break
      
if flag==1:
  print('YES')
else:
  print('NO')

N=int(input())
flag=0
for A in range(1,10):
  for B in range(1,10):
    if N==A*B:
      flag=1
      break


if flag==1:
  print('Yes')
else:
  print('No')


Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())  
for i in range(1,10):
  for j in range(1,10):
    if i*j == N:
      print('Yes')
      return
print('No')

def main():
    N = int(input())  
    for i in range(1,10):
        for j in range(1,10):
            if i*j == N:
                print('Yes')
                return
    print('No')

if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n = int(input())
a = 0
for i in range(10):
  for j in range(10):
    
    s = i * j
    print(s)
    if s == n:
      a =a + 1
if a>0:
  print('Yes')
else:
  print('No')

n = int(input())
a = 0
for i in range(10):
  for j in range(10):
    s = i * j
    if s == n:
      a =a + 1
if a>0:
  print('Yes')
else:
  print('No')

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
N = int(input())

for i in range(1, 10):
    for j in range(1, 10):
        if(N == i*j):
            print("Yes")
            break
else:
    print("No")

N = int(input())

for i in range(1, 10):
    for j in range(1, 10):
        if(N == i*j):
            print("Yes")
            quit()
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):
n=int(input())
for i in range(10):
  for j in range(10):
    if i*j == n:
      print('Yes')
    exit()
print('No')

n = int(input())
for i in range(1,10):
    for j in range(1,10):
        if i*j == n:
            print("Yes")
            exit(0)
print("No")

Verdicts: Wrong Answer

Accepted
Problem: Having learned the multiplication table, Takahashi can multiply two integers between 1 and 9 (inclusive) together.  Given an integer N, determine whether N can be represented as the product of two integers between 1 and 9. If it can, print `Yes`; if it cannot, print `No`.

Submission attempts (in order):

a = int(input())

text="No"

for i in range(1,9):
    for j in range(1,9):
        if i*j == a:
            text ="Yes"
        break
    else:
        continue
        
else:
    print(text)


a = int(input())

text="No"

for i in range(1,10):
    for j in range(1,10):
        if i*j == a:
            text ="Yes"

print(text)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
n=int(input())
ans=n+1
i=1
while i*i<=n:
    if n%i==0 and ans > n%i+n/i:
        ans = n%i + n/i
print(ans-2)

import math
n=int(input())
ans=n+1
i=1
while i<=math.sqrt(n):
    if n%i==0:
        ans = n%i + n/i
        i+=1
print(ans-2)

import math
n=int(input())
ans=n+1
i=1
while i<=math.sqrt(n):
    if n%i==0 and ans > i +n/i:
        ans = i + n/i
    i+=1
ans = int(ans)
print(ans-2)

Verdicts: Time Limit Exceeded

Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
n=int(input())
end=n**(1/2)
for i in range(end,0,-1):
  if n%i==0:
    j=n//i
    print(i+j-2)
    break

n=int(input())
end=n**(1/2)
for i in range(end,1,-1):
  if n%i==0:
    j=n//i
    print(i*j-2)
    break

n=int(input())
end=int(n**(1/2))
for i in range(end,0,-1):
  if n%i==0:
    j=n//i
    print(i+j-2)
    break

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    a.sort()
    return a

def eval_ab(a, b):
    if a == 1 or b == 1:
        return a + b - 1
    else:
        return a + b - 2
    
def split(ary, a, b, i):
    e = eval_ab(a, b)

    if len(ary) == i:
        return eval_ab(a, b)
    v = ary[i]

    v1 = split(ary, a * v, b, i+1)
    v2 = split(ary, a, b * v, i+1)
    return min(v1, v2)

def light(ary):
    a = 1
    b = 1
    for v in ary:
        if a < b:
            a *= v
        else:
            b *= v
    return eval_ab(a, b)

ary = prime_factorize(N)
print(ary)

if len(ary) == 1:
    print(str(ary[0] - 1))
elif len(ary) == 2:
    cost = ary[0] + ary[1] - 2
    print(str(cost))
else:
    if N < 100000:
        v1 = split(ary, 1, 1, 0)
        print(v1)
    else:
        v1 = light(ary, 1, 1, 0)
        print(v2)
    #v2 = light(ary)
    #v1 = split(ary, 1, 1, 0)
    #print(v1, v2)
    #print(str(v))



import math
N = int(input())

def eval_ab(a, b):
    if a == 1 or b == 1:
        return a + b - 1
    else:
        return a + b - 2
    
min_e = N - 1
a = int(math.sqrt(N)) + 2
for i in range(1, a):

    if N % i == 0:
        j = N // i
        e = eval_ab(i, j)
        min_e = min(e, min_e)

print(min_e)

Verdicts: Runtime Error

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
n = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n_list = prime_factorize(n)
n_list.insert(0, 1)
n_score = []

a = 1
n_list_2 = set(n_list)
n_list_2 = list(n_list_2)
for j in range(len(n_list_2)):
    a = n_list_2[j]
    n_list.remove(a)
    for i in range(len(n_list)):
        a = a * n_list[i]
        b = n / a
        n_score.append(int(a+b))

n_score.sort()
print(n_score)
print(n_score[0]-2)

n = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n_list = prime_factorize(n)
n_list.insert(0, 1)
n_score = []
print(n_list)
a = 1
n_list_2 = set(n_list)
n_list_2 = list(n_list_2)
print(n_list_2)
for j in range(len(n_list_2)):
    a = n_list_2[j]
    for i in range(len(n_list)):
        a = a * n_list[i]
        b = n / a
        n_score.append(int(a+b))

n_score.sort()

print(n_score[0]-2)

n = int(input())

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            divisors.append(n//i)

    
    return divisors

n_list = make_divisors(n)
n_ans = []
print(n_list)
for i in range(0, len(n_list)-1, 2):
    n_ans.append(n_list[i]+n_list[i+1])

n_ans.sort()

print(n_ans[0]-2)

n = int(input())


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            divisors.append(n//i)

    
    return divisors

list_n = make_divisors(n)

a = len(list_n)
ans = []
for i in range(0, a-1, 2):
    ans.append(list_n[i]+list_n[i+1])

ans.sort()

print(ans[0]-2)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
import math
N=944128792089

han=999999999999999999999999999999999999999999
b=0



for a in range(1,int(math.sqrt(N))+1):
    if N%a==0:
        A=N/a
        if A>a:
            gou=A-a
        else:
            gou=a-A
        b=a
        if gou<han:
            han=gou
            kot=A+a
if b==A:
    print(int(kot)-1)
else:
    print(int(kot)-2)


import math
N=50
han=999999999999999999999999999999999999999999
b=0



for a in range(1,int(math.sqrt(N))+1):
    if N%a==0:
        A=N/a
        if A>a:
            gou=A-a
        else:
            gou=a-A
        b=a
        if gou<han:
            han=gou
            kot=A+a
if b==A:
    print(int(kot)-1)
else:
    print(int(kot)-2)


import math
N=10000000019
han=999999999999999999999999999999999999999999
b=0



for a in range(1,int(math.sqrt(N))+1):
    if N%a==0:
        A=N/a
        if A>a:
            gou=A-a
        else:
            gou=a-A
        b=a
        if gou<han:
            han=gou
            kot=A+a
if b==A:
    print(int(kot)-1)
else:
    print(int(kot)-2)


import math
N=int(input())

han=999999999999999999999999999999999999999999
b=0



for a in range(1,int(math.sqrt(N))+1):
    if N%a==0:
        A=N/a
        if A>a:
            gou=A-a
        else:
            gou=a-A
        b=a
        if gou<han:
            han=gou
            kot=A+a

print(int(kot)-2)


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
N = int(input())
fac = []
for i in range(1, N**(1/2) + 1):
  if (N % i == 0 and N // i <= i):
    print(N // i + i - 2)
    exit()

N = int(input())
i = 1
while (i ** 2 <= N):
  if (N % i == 0 and N // i <= i):
    print(N // i + i - 2)
    exit()
  i += 1

import math
N = int(input())
fac = []
for i in range(1, math.floor(N**(1/2)) + 1):
  if (N % i == 0 and N // i <= i):
    print(N // i + i - 2)
    exit()

N = int(input())
i = 1
ans = N
while (i ** 2 <= N):
  if (N % i == 0):
    ans = min(ans, N // i + i - 2)
  i += 1

print(ans)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
n = int(input())
for i in range(int(n**0.5)+1, 0, -1):
  if n//i == 0 and i <= n//i:
    key = i
    break
print(i+n//i-2)

n = int(input())
for i in range(int(n**0.5)+1, 0, -1):
  if n%i == 0 and i <= n//i:
    key = i
    break
print(i+n//i-2)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
import math

N = int(input())

route_N = math.sqrt(N)

# a+b-2 minimum
# a*b = N 

ans = 10e+12

for a in range(1,int(route_N)+1):
    if N%a ==0:
        ans = min(ans,a+(N/a)-2)

print(ans)




import math

N = int(input())

route_N = math.sqrt(N)

# a+b-2 minimum
# a*b = N 

ans = 10e+12

for a in range(1,int(route_N)+1):
    if N%a ==0:
        ans = min(ans,a+(N/a)-2)

print(int(ans))




Verdicts: Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
import math
N = int(input())
n = round(math.sqrt(N))
counter = 0
for i in range(n):
		if N%(n-i) == 0 and counter == 0:
			counter+=1
			var1=(n-i)
			var2=N/(n-i)
            
print(var1+var2-2)        


import math
N = int(input())
n = round(math.sqrt(N))
counter = 0
for i in range(n):
		if N%(n-i) == 0 and counter == 0:
			counter+=1
			var1=(n-i)
			var2=N/(n-i)
            
print(int(var1+var2-2)) 

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
root = int(int(input())**0.5)
print(min([i + N //i -2 for i in range(1, root+1) if N % i == 0])

N = int(input())
root = int(N**0.5)
print(min([i + N // i -2 for i in range(1, root+1) if N % i == 0]))

Verdicts: Runtime Error

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
import math
n = int(input())
nrt = int(math.sqrt(n))
for i in range(nrt):
    j = nrt-i
    if n % j == 0:
        s = n // j
        ans = j+s-2
print(ans)

import math
n = int(input())
nrt = int(math.sqrt(n))
for i in range(nrt):
    j = nrt-i
    if n % j == 0:
        s = n // j
        ans = j+s-2
        break
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is standing on a multiplication table with infinitely many rows and columns.  The square (i,j) contains the integer i \times j. Initially, Takahashi is standing at (1,1).  In one move, he can move from (i,j) to either (i+1,j) or (i,j+1).  Given an integer N, find the minimum number of moves needed to reach a square that contains N.

Submission attempts (in order):
N = int(input())
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

a = make_divisors(N)
if len(a)%2 == 1:
  print(2*int(math.sqrt(N))-2)
else:
  b = a[len(a)/2-1]
  c = a[len(a)/2]
  print(b+c-2)

N = int(input())
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

a = make_divisors(N)
if len(a)%2 == 1:
  print(2*int(math.sqrt(N))-2)
if len(a)%2 == 0:
  b = a[int(len(a))/2-1]
  c = a[int(len(a))/2]
  print(b+c-2)

N = int(input())
import math

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

a = make_divisors(N)
if len(a)%2 == 1:
  print(2*int(math.sqrt(N))-2)
if len(a)%2 == 0:
  b = a[len(a)//2-1]
  c = a[len(a)//2]
  print(b+c-2)

Verdicts: Runtime Error

Runtime Error

Accepted