ZhenlongDai/ACPR huggingface dataset:
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a = int(input())
s = int(a ** 0.5)
for i in range(s):
  if a%(s-i)==0:
    print(a/(s-i) + (s-i) - 2)
    break

Failing test case input:
7288680

Expected output:
9515


Actual output:
9515.0


Fixed submission (verdict: Accepted):
a = int(input())
s = int(a ** 0.5)
for i in range(s):
  if a%(s-i)==0:
    print(int(a/(s-i) + (s-i) - 2))
    break

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
import sys

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

for i in range(round(math.sqrt(N))):
  j = i + 1
  if N % j == 0:
    if a > j - 1 + N / j - 1:
      a = j - 1 + N / j - 1
print(a)

Failing test case input:
13066949

Expected output:
9688


Actual output:
3614.8235088313786


Fixed submission (verdict: Accepted):
import math

N = int(input())
a = N + 1
b = round(math.sqrt(N))

for i in range(b):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(round(a) - 2)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
xlist=[]

for i in range(1,int(n**0.5)+1):
    if n%i==0:
        xlist.append(i)

ans=max(xlist)
print(ans+n/ans-2)

Failing test case input:
40908102

Expected output:
13401


Actual output:
13401.0


Fixed submission (verdict: Accepted):
n=int(input())
xlist=[]
 
for i in range(1,int(n**0.5)+1):
    if n%i==0:
        xlist.append(i)
 
ans=max(xlist)
print(int(ans+n/ans-2))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys
input = sys.stdin.readline
 
N=int(input())
ans=10**12
for i in range(1,int(N**0.5)+1):
    if N%i==0: 
        ans=min(ans,i+N/i) 
print(ans-2) 

Failing test case input:
63407968

Expected output:
152837


Actual output:
152837.0


Fixed submission (verdict: Accepted):








import sys
input = sys.stdin.readline
 
N=int(input())
ans=10**12
for i in range(1,int(N**0.5)+1):
    if N%i==0: 
        ans=min(ans,i+N
print(ans-2)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

x = int(input())

tmp = []

for i in range(1, int(math.sqrt(x)) + 1):
    if x % i == 0:
        tmp.append((i - 1) + (x / i - 1))

print(min(tmp))

Failing test case input:
65898355

Expected output:
13179674


Actual output:
13179674.0


Fixed submission (verdict: Accepted):
import math

x = int(input())

tmp = []

for i in range(1, int(math.sqrt(x)) + 1):
    if x % i == 0:
        tmp.append(int((i - 1) + (x / i - 1)))

print(min(tmp))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

n = int(input())

ans  = 10 ** 7 
for i in range(1, math.floor(math.sqrt(n)) + 1):
    if n%i != 0:
        continue
    j = n/i
    ans = min(ans, i+j-2)

print(ans)

Failing test case input:
58882661

Expected output:
463768


Actual output:
463768.0


Fixed submission (verdict: Accepted):
import math

n = int(input())

ans  = 10 ** 12 
for i in range(1, math.floor(math.sqrt(n)) + 1):
    if n%i != 0:
        continue
    j = int(n/i)
    ans = min(ans, i+j-2)

print(ans)
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import math

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

ls = []
for i in range(1, int(sqrt) + 1):
  if N % i == 0:
    ls.append((i, int(N/i)))

print(ls)

print(min(a[0] + a[1] -2 for a in ls))


Failing test case input:
7745231

Expected output:
10558


Actual output:
[(1, 7745231), (13, 595787), (61, 126971), (793, 9767)]
10558


Fixed submission (verdict: Accepted):
import sys
import math

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

ls = []
for i in range(1, int(sqrt) + 1):
  if N % i == 0:
    ls.append((i, int(N/i)))


print(min(a[0] + a[1] -2 for a in ls))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=int(n**(1/2))
for i in range(a):
    if n%(a-i)==0:
        print(int((a-i)+(n/(a-i))-1))
        break

Failing test case input:
68833649

Expected output:
68833648


Actual output:
68833649


Fixed submission (verdict: Accepted):
n=int(input())
a=int(n**(1/2))
for i in range(a):
    if n%(a-i)==0:
        print(int((a-i)+(n/(a-i))-2))
        break

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
a = [1,1]
ans = 100000000000
for i in range(int(math.sqrt(n))):
    a[0] += 1
    if(n%a[0] == 0):
        ans =min(ans,a[0] + int(n/a[0])-2)
    

a[1] = int(n/a[0])

print(ans)




Failing test case input:
10000000019

Expected output:
10000000018

Actual output:
100000000000


Fixed submission (verdict: Accepted):
import math
n = int(input())
a = [1,1]
ans = 100000000000000
for i in range(int(math.sqrt(n))):
    
    if(n%a[0] == 0):
        ans =min(ans,a[0] + int(n/a[0])-2)
    a[0] += 1

a[1] = int(n/a[0])

print(ans)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
import math
A = []
for i in range(1,int(math.sqrt(N))+1):
    if N % i == 0:
        A.append(i+N/i-2)
print(min(A))

Failing test case input:
63407968

Expected output:
152837


Actual output:
152837.0


Fixed submission (verdict: Accepted):
N = int(input())
import math
A = []
for i in range(1,int(math.sqrt(N))+1):
    if N % i == 0:
        A.append(i+N/i-2)
print(int(min(A)))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
ans=n-1
if(n%2==0):
  ans=int(n/2)
e=int(n**(1/2))+1
for i in range(3,e,2):
  if(n%i==0):
    ans=min(ans,i+int(n/i)-2)
print(ans)

Failing test case input:
23879760

Expected output:
9830


Actual output:
9927


Fixed submission (verdict: Accepted):
n=int(input())
ans=n-1
e=int(n**(1/2))+1
for i in range(2,e):
  if(n%i==0):
    ans=min(ans,i+int(n/i)-2)
print(ans)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

i = 1
j = 1 
l = []
while i <= (N/i):

  if N%i == 0:
    j = int(N/i)
    l.append([i,j])
  
  i+=i

res = l.pop()

print(res[0]+ res[1] -2)


Failing test case input:
1486743

Expected output:
2742


Actual output:
1486742


Fixed submission (verdict: Accepted):
N = int(input())

i = 1
j = 1 
l = []
while i <= (N/i):
  if N%i == 0:
    j = int(N/i)
    l.append([i,j])
  
  i+=1

res = l.pop()
print(res[0]+ res[1] -2)
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
a = [1,1]
ans = 100000000
for i in range(int(math.sqrt(n))):
    a[0] += 1
    if(n%a[0] == 0):
        ans =min(ans,a[0] + int(n/a[0])-2)
    

a[1] = int(n/a[0])

print(ans)




Failing test case input:
28427327

Expected output:
28427326


Actual output:
100000000


Fixed submission (verdict: Accepted):
import math
n = int(input())
a = [1,1]
ans = 100000000000000
for i in range(int(math.sqrt(n))):
    
    if(n%a[0] == 0):
        ans =min(ans,a[0] + int(n/a[0])-2)
    a[0] += 1

a[1] = int(n/a[0])

print(ans)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math


N = int(input())

ans = 10**12
square = math.ceil(math.sqrt(N))
print(square)
for i in range(1, square+1):
    if N%i == 0:
        ans = min(ans, int(N/i))
b = int(N/ans)
print(ans + b-2)

Failing test case input:
10000000019

Expected output:
10000000018

Actual output:
100001
10000000018


Fixed submission (verdict: Accepted):
import math


N = int(input())

ans = 10**12
square = math.ceil(math.sqrt(N))
for i in range(1, square+1):
    if N%i == 0:
        ans = min(ans, N/i)
b = N/ans
print(int(ans + b-2))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


import sys
import math
from math import sqrt
input = sys.stdin.readline


N = int(input())
for i in range(int(sqrt(N))+1,-1,-1):
    if N % i == 0:
        print(i+(N/i)-2)
        exit()
        


Failing test case input:
19652440

Expected output:
10011


Actual output:
10011.0


Fixed submission (verdict: Accepted):


import sys
import math
from math import sqrt
input = sys.stdin.readline


N = int(input())
for i in range(int(sqrt(N))+1,-1,-1):
    if N % i == 0:
        print(int(i+(N/i)-2))
        exit()

Problem: p02881
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
ans = 1e14
for i in range(1, int(n**(1/2) + 1)):
    if n % i == 0:
        ans = min(ans, i + n / i - 2)

print(ans)


Failing test case input:
39774117

Expected output:
13258040


Actual output:
13258040.0


Fixed submission (verdict: Accepted):
n = int(input())
ans = 1e14
for i in range(1, int(n**(1/2) + 1)):
    if n % i == 0:
        ans = min(ans, i + n 

print(ans)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


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

    
    ans = float("inf")
    for i in range(1, N):
        if i > N**(1/2):
            break

        if N%i == 0:
            ans = min(ans, (i-1)+(N%i-1))
    print(ans)


if __name__ == "__main__":
    solve()


Failing test case input:
46755701

Expected output:
18100


Actual output:
-1


Fixed submission (verdict: Accepted):


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

    
    ans = float("inf")
    for i in range(1, N):
        if i > N**(1/2):
            break

        if N%i == 0:
            ans = min(ans, (i-1)+(N
    print(ans)


if __name__ == "__main__":
    solve()
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
m = n**0.5
ans = 0


for i in range(1,math.floor(m+1)):
    if m%i==0:
        ans = i
    else :
        ans = 1
print(math.floor(ans+ n/ans -2))

Failing test case input:
31632100

Expected output:
316419


Actual output:
31632099


Fixed submission (verdict: Accepted):
import math
n = int(input())
m = n**0.5
ans = 1
x = 0 


for i in range(1,math.floor(m)+1):
    x += 1 
    if n%i==0:
        ans = i

print(math.floor(ans+ n/ans -2))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
sq = pow(n, 0.5)
flg = False
for i in (2, sq):
    if n % i == 0:
        flg = True
if flg:
    print(math.floor(sq) * 2 - 1)
else:
    print(n - 1)


Failing test case input:
2007462

Expected output:
19781


Actual output:
2831


Fixed submission (verdict: Accepted):
import math
n = int(input())
sq = math.floor(pow(n, 0.5))
ans = []
for i in range(2, sq + 1):
    if n % i == 0:
        ans.append((i - 1) + ((n 
if len(ans) > 0:
    print(min(ans))
else:
    print(n - 1)

Problem: p02881
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import math
N = int(input())

m = 99999999
pair = [0,0]
for i in range(1,int(math.sqrt(N))+1):
    if N % i == 0:
        if int(N/i) - i < m:
            m = int(N/i) - i
            pair = [int(N/i),i]

t = pair[0] + pair[1] - 2
print(t)

Failing test case input:
10000000019

Expected output:
10000000018

Actual output:
-2


Fixed submission (verdict: Accepted):
import math
N = int(input())

m = float('inf')
pair = [0,0]
for i in range(1,int(math.sqrt(N))+1):
    if N % i == 0:
        if int(N/i) - i < m:
            m = int(N/i) - i
            pair = [int(N/i),i]

t = pair[0] + pair[1] - 2
print(t)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())

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




Failing test case input:
13758358

Expected output:
221969


Actual output:
221969.0


Fixed submission (verdict: Accepted):
import math

N = int(input())

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

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = float(input())
A = int(N**(0.5))
max = 10**12
print(A)
for i in range(1,A+1):
    B = N/float(i)
    if B.is_integer():
        c = i+B-2
        if c<= max:
            max = c
print(int(max))

Failing test case input:
6785456

Expected output:
424105


Actual output:
2604
424105


Fixed submission (verdict: Accepted):
N = float(input())
A = int(N**(0.5))
max = 10**12
for i in range(1,A+1):
    B = N/float(i)
    if B.is_integer():
        c = i+B-2
        if c<= max:
            max = c
print(int(max))
Problem: p02881
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())

res = float('inf')
for x in range(1, int(n**0.5) + 1):
    if n % x == 0:
        res = min(res, x-1 + n/x -1)
print(res)

Failing test case input:
1013510

Expected output:
2785


Actual output:
2785.0


Fixed submission (verdict: Accepted):
n = int(input())

res = float('inf')
for x in range(1, int(n**0.5) + 1):
    if n % x == 0:
        res = min(res, x-1 + n
print(res)

Problem: p02881
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)


Failing test case input:
415214

Expected output:
1507


Actual output:
13


Fixed submission (verdict: Accepted):
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)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
for i in range(int(math.sqrt(n)), 0, -1):
    if n%i==0:
        print(int((i-1)+(n/i-1)))

Failing test case input:
13288071

Expected output:
4429358


Actual output:
4429358
13288070


Fixed submission (verdict: Accepted):
import sys
import math
n = int(input())
for i in range(int(math.sqrt(n)), 0, -1):
    if n%i==0:
        print(int((i-1)+(n/i-1)))
        sys.exit()

Problem: p02881
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)


Failing test case input:
28888083

Expected output:
10762


Actual output:
2014564


Fixed submission (verdict: Accepted):
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)

Problem: p02881
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
m = 10**13
for x in range(1,1000001):
  y = n / x
  if y % 1 == 0:
    v = x + y -2
    m = min(m, v)
print(m)

Failing test case input:
40908102

Expected output:
13401


Actual output:
13401.0


Fixed submission (verdict: Accepted):
n = int(input())
m = 10**13
for x in range(1,1000001):
  y = n / x
  if y % 1 == 0:
    v = x + y -2
    m = min(m, v)
print(int(m))
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math


def main():
    a = int(input())
    for i in range(int(math.sqrt(a)) + 1, 0, -1):
        if(a % i == 0):
            print(i + (a / i) - 2)
            return


if(__name__ == "__main__"):
    main()


Failing test case input:
6321719

Expected output:
6321718


Actual output:
6321718.0


Fixed submission (verdict: Accepted):
import math


def main():
    a = int(input())
    for i in range(int(math.sqrt(a)) + 1, 0, -1):
        if(a % i == 0):
            print(int(i + (a / i) - 2))
            return


if(__name__ == "__main__"):
    main()

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):



N=int(input())

ans=N
for i in range(1,10**6):
    if i > N: break
    if N%i == 0:
        A=(N/i-1)+(i-1)
        if A < ans:
            ans = A
            
print(int(A))

Failing test case input:
223605823

Expected output:
31934


Actual output:
152462


Fixed submission (verdict: Accepted):



N=int(input())

ans=N
for i in range(1,10**12):
    if i**2 > N: break
    if N%i == 0:
        A=(N/i-1)+(i-1)
        if A < ans:
            ans = A
            
print(int(A))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

a = int(input())
j=0
mass=100000000
for i in range(9):
    j = j+1
    h=a/j
    if (h.is_integer()):    
        ans="Yes"
        mass2=j+h-2
        if(mass>=mass2):
            mass=mass2
    else:
        ans="No"
    

print(int(mass))


Failing test case input:
1630296

Expected output:
22713


Actual output:
181151


Fixed submission (verdict: Accepted):

a = int(input())
j=0
mass=1000000000000
for i in range(round(a**(1/2))):
    j = j+1
    h=a/j
    if (h.is_integer()):    
        mass2=j+h-2
        if(mass>mass2):
            mass=mass2
        

    

print(int(mass))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
ans = n - 1
a = 1
while a * a <= n:
  if n % a == 0:
    ans = min(ans, a - 1 + (n / a) - 1)
  a += 1
print(ans)

Failing test case input:
21977871

Expected output:
7325958


Actual output:
7325958.0


Fixed submission (verdict: Accepted):
n = int(input())
ans = n - 1
a = 1
while a * a <= n:
  if n % a == 0:
    ans = min(ans, a - 1 + (n 
  a += 1
print(ans)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())
n = math.sqrt(N)
ans = 10 ** 12

for i in range(1 , math.ceil(n) + 1):
  if i * math.ceil(N / i) == N:
    count = (i - 1) + ((N / i) - 1)
    ans = min(ans , count)
    
print(ans)

Failing test case input:
20917284

Expected output:
47553


Actual output:
47553.0


Fixed submission (verdict: Accepted):
import math

N = int(input())
n = math.sqrt(N)
ans = 10 ** 12

for i in range(1 , math.ceil(n) + 1):
  if i * (N 
    count = (i - 1) + ((N 
    ans = min(ans , count)
    
print(ans)
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from math import sqrt

N = int(input())

it = int(sqrt(N))

for i in range(it, 0, -1):
    remain = N % i
    if remain == 0:
        shou = N / i

        if shou:
            print(i+shou-2)
            break


Failing test case input:
6326357

Expected output:
275080


Actual output:
275080.0


Fixed submission (verdict: Accepted):
from math import sqrt

N = int(input())

it = int(sqrt(N))

for i in range(it, 0, -1):
    remain = N % i
    if remain == 0:
        shou = N / i

        print(int(i+shou-2))
        break

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
ans = n - 1
for i in range(2, 10^6):
  if n%i==0 and i+n/i-2<ans:
    ans = i + int(n / i) - 2
print(ans)

Failing test case input:
4495368

Expected output:
4257


Actual output:
561927


Fixed submission (verdict: Accepted):
n = int(input())
ans = n - 1
for i in range(2, 10**6+1):
  
  if n%i==0 and i+n/i-2<ans:
    ans = int(i + n / i - 2)
print(ans)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
import sys

N = int(input())
a = 0

for i in reversed(range(round(math.sqrt(N)))):
  if N % (i + 1) == 0:
    print(i + N / (i + 1) - 1)
    sys.exit()

Failing test case input:
49126915

Expected output:
32954


Actual output:
32954.0


Fixed submission (verdict: Accepted):
import math

N = int(input())
a = N + 1
b = round(math.sqrt(N))

for i in range(b):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(round(a) - 2)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
b = input()
a = int(b)

c = int(math.sqrt(a))

for i in range(1000):
    d = a / (c + i)
    if d.is_integer() == True:
        break

e = d + c + i - 2
print(int(e))


Failing test case input:
10580884

Expected output:
2645223


Actual output:
6738


Fixed submission (verdict: Accepted):
import math
b = input()
a = int(b)

sqA = int(math.sqrt(a))

for i in range(10000000):
    d = a / (sqA - i)
    if d.is_integer() == True:
        break


e = d + sqA - i - 2

print(int(e))

Problem: p02881
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())

p = 1
if n%2 == 0:
    p = 2

for i in range(3, int(n**0.5)+1, 2):
    if n%i == 0:
        p = i

print(int(p+n/p-2))

Failing test case input:
56404508

Expected output:
266269


Actual output:
1064287


Fixed submission (verdict: Accepted):
n = int(input())

p = 1

for i in range(2, int(n**0.5)+1):
    if n%i == 0:
        p = i

print(int(p+n/p-2))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
ans = 10000000020
for i in range(int(math.sqrt(N)),0, -1):
    if i * i > N:
        break
    if N % i != 0:
        continue
    j = N 
    ans = min(ans, i+j-2)

print(ans)


Failing test case input:
2007462

Expected output:
19781


Actual output:
2007461


Fixed submission (verdict: Accepted):
import math

N = int(input())

ans = 1e18
for i in range(int(math.sqrt(N)), 0, -1):
    if N%i != 0:
        continue
    j = N/i
    ans = min(ans, i+j-2)
print(int(ans))
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
ans = 10000000020
for i in range(1,int(math.sqrt(N)+1)):
    if N % i != 0:
        continue
    j = N / i
    ans = min(ans, i+j-2)

print(ans)


Failing test case input:
223605823

Expected output:
31934


Actual output:
31934.0


Fixed submission (verdict: Accepted):
import math

N = int(input())

ans = 1e18
for i in range(int(math.sqrt(N)), 0, -1):
    if N%i != 0:
        continue
    j = N/i
    ans = min(ans, i+j-2)
print(int(ans))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
n = N**0.5

if n % 1 == 0:
  print(2* n -2)
else:
  n = int(round(n, 0))
  while N % n != 0 :
    n = n - 1
  b = N / n
  print(n + b -2)

Failing test case input:
529745

Expected output:
1552


Actual output:
1552.0


Fixed submission (verdict: Accepted):
import math

N=int(input())
n = N**0.5

if n % 1 == 0:
  print(math.floor(2* n -2))
else:
  n = int(round(n, 0))
  while N % n != 0 :
    n = n - 1
  b = N / n
  print(math.floor(n + b -2))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())
a = N

for i in range(round(math.sqrt(N))):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(a - 2)

Failing test case input:
1873386

Expected output:
2761


Actual output:
2761.0


Fixed submission (verdict: Accepted):
import math

N = int(input())
a = N + 1
b = round(math.sqrt(N))

for i in range(b):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(round(a) - 2)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N = int(input())
a = N
b = round(math.sqrt(N))

for i in range(b):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(a - 2)

Failing test case input:
18833720

Expected output:
9136


Actual output:
9136.0


Fixed submission (verdict: Accepted):
import math

N = int(input())
a = N + 1
b = round(math.sqrt(N))

for i in range(b):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(round(a) - 2)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
for i in range(math.floor(math.sqrt(n)), 0, -1):
    if n % i==0:
        print(i + n/i - 2)
        exit()

Failing test case input:
14135619

Expected output:
277218


Actual output:
277218.0


Fixed submission (verdict: Accepted):
import math
n = int(input())
for i in range(math.floor(math.sqrt(n)), 0, -1):
    if n % i==0:
        print(i + n
        exit()
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n = int(input())
sq = math.floor(pow(n, 0.5))
flg = False
for i in range(2, sq + 1):
    if n % i == 0:
        flg = True
        break
if flg:
    print(sq * 2 - 1)
else:
    print(n - 1)


Failing test case input:
14845338

Expected output:
824757


Actual output:
7703


Fixed submission (verdict: Accepted):
import math
n = int(input())
sq = math.floor(pow(n, 0.5))
ans = []
for i in range(2, sq + 1):
    if n % i == 0:
        ans.append((i - 1) + ((n 
if len(ans) > 0:
    print(min(ans))
else:
    print(n - 1)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
ans = 10000000020
for i in range(1,int(math.sqrt(N)+1)):
    if i * i > N:
        break
    if N % i != 0:
        continue
    j = N 
    ans = min(ans, i+j-2)

print(ans)


Failing test case input:
7288680

Expected output:
9515


Actual output:
7288679


Fixed submission (verdict: Accepted):
import math

N = int(input())

ans = 1e18
for i in range(int(math.sqrt(N)), 0, -1):
    if N%i != 0:
        continue
    j = N/i
    ans = min(ans, i+j-2)
print(int(ans))

Problem: p02881
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
c=int(input())
count=1
ans=10000000000000
k=c
for i in range(1,int(c**(1/2))):
    if c%i==0:
        count*=i
        k=int(k/i)
        if ans>count+k:
            ans=count+k
print(ans-2)

Failing test case input:
18762394

Expected output:
191549


Actual output:
11555


Fixed submission (verdict: Accepted):
c=int(input())
count=1
ans=10000000000000
k=c
for i in range(1,int(c**(1/2)+100000)):
    if c%i==0:
        if ans>i+int(c/i):
            ans=i+int(c/i)
        else:
            continue
print(ans-2)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

N=int(input())
n=math.ceil(math.sqrt(N))

ans=1000000000000

for i in range(1,n+1):
    if N%i==0:
        if ans>i+(N/i):
            ans=i+(N/i)

print(ans-2)


Failing test case input:
38100885

Expected output:
12372


Actual output:
12372.0


Fixed submission (verdict: Accepted):
import math

N=int(input())
n=math.ceil(math.sqrt(N))

ans=1000000000000

for i in range(1,n+1):
    if N%i==0:
        if ans>i+(N/i):
            ans=i+(N/i)

print(int(ans-2))

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
if N**(1/2) >= 2:
  for x in range(int(N**(1/2)), 1, -1):
    if (N % x == 0):
      print(int(x + N/x - 2))
      break
else:
  print(N-1)

Failing test case input:
68833649

Expected output:
68833648


Actual output:

Fixed submission (verdict: Accepted):
N = int(input())
def findSteps(n):
  for x in range(int(n**(1/2)), 1, -1):
    if (n % x == 0):
      return (int(x + n/x - 2))
  return (N-1)
 
print(findSteps(N))
Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
rn = int(n**(0.5))+1
ans = n
for i in range(rn):
	if n%(i+1) == 0:
		ans = min(int(n/(i+1))+i+1, ans)

print(ans-2)

Failing test case input:
6321719

Expected output:
6321718


Actual output:
6321717


Fixed submission (verdict: Accepted):
n = int(input())
rn = int(n**(0.5))+1
ans = n
for i in range(1,rn):
	if n%i == 0:
		
		ans = min((n
		

print(ans)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
import sys

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

for i in range(round(math.sqrt(N))):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(a - 2)

Failing test case input:
25353228

Expected output:
10169


Actual output:
5033.198903717707


Fixed submission (verdict: Accepted):
import math

N = int(input())
a = N + 1
b = round(math.sqrt(N))

for i in range(b):
  j = i + 1
  if N % j == 0:
    if a > j + N / j:
      a = j + N / j
print(round(a) - 2)

Problem: p02881
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
N = int(input())
ans = 10000000020
for i in range(1,int(math.sqrt(N)+1)):
    if i * i > N:
        break
    if N % i != 0:
        continue
    j = N / i
    ans = min(ans, i+j-2)

print(ans)


Failing test case input:
23879760

Expected output:
9830


Actual output:
9830.0


Fixed submission (verdict: Accepted):
import math

N = int(input())

ans = 1e18
for i in range(int(math.sqrt(N)), 0, -1):
    if N%i != 0:
        continue
    j = N/i
    ans = min(ans, i+j-2)
print(int(ans))
Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = list(map(int, input().split()))
ans = max(A * N, B)

print(ans)


Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N, A, B = list(map(int, input().split()))
ans = min(A * N, B)

print(ans)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int, input().split())
if A*N > B:
  print(A*N)
if A*N <= B:
  print(B)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
if A*N > B:
  print(B)
if A*N <= B:
  print(A*N)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split())

print(n *a if  n *a >= b else b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b=map(int,input().split())

print(n *a if  n *a <= b else b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c = map(int, input().split())

if a*b > c:
    print(a*b)
else:
    print(c)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
a,b,c = map(int, input().split())

if a*b < c:
    print(a*b)
else:
    print(c)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b = map(int,input().split())
print(n*a if n*a > b else b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b = map(int,input().split())
print(n*a if n*a <= b else b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,t,i=input().split()
a=int(a)
t=int(t)
x = a * t
i=int(i)
c=min(x,i)

Failing test case input:
7 17 120

Expected output:
119

Actual output:

Fixed submission (verdict: Accepted):
a,t,i=input().split()
a=int(a)
t=int(t)
x=a*t
i=int(i)
c=min(x,i)
print(c)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())
print(n*a if n*a >= b else b)


Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
print(n*a if n*a <= b else b)

Problem: p03501
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n, a, b = map(int, input().split())
if a*n <= b:
    print(a*b)
else:
    print(b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
2040


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
if a*n <= b:
    print(a*n)
else:
    print(b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())
print(max(A*N,B))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())
print(min(A*N,B))
Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int, input().split())
if A*N > B:
  print(A*N)
if A*N < B:
  print(B)
if A*N == B:
  print(B)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
if A*N > B:
  print(B)
if A*N <= B:
  print(A*N)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int, input().split())
print(max(N * A, B))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
print(min(N * A, B))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,b,a = map(int,input().split())
print(min(a*n,b))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
17


Fixed submission (verdict: Accepted):
n,a,b = map(int,input().split())
print(min(a*n,b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())

print(max(N*A,B))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())

print(min(N*A,B))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())
print(B if N+A>B else N+A )

Failing test case input:
7 17 120

Expected output:
119

Actual output:
24


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())
print(B if N*A>B else N*A )

Problem: p03501
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
l,m,n=map(int,input(" ").split())
if l*m>=n:
  print(l*n)
else:
  print(n)



Failing test case input:
7 17 120

Expected output:
119

Actual output:
 120


Fixed submission (verdict: Accepted):
l,m,n=map(int,input(" ").split())
if l*m>=n:
  print(n)
else:
  print(l*m)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int, input().split())
print(N*A+B if N*A<B else B)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
239


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
print(N*A if N*A<B else B)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B = map(int,input().split())
K = N*A
if K<B:
  print(A)
elif B<K:
  print(B)
else:
  print(A)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
17


Fixed submission (verdict: Accepted):
N,A,B = map(int,input().split())
K = N*A
if K<B:
  print(K)
elif B<K:
  print(B)
else:
  print(K)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

n, a, b = map(int, input().split())
print(min(b, a + n))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
24


Fixed submission (verdict: Accepted):
import math

n, a, b = map(int, input().split())
print(min(b, a * n))
Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())

if n*a > b:
  print(n*a)
else:
  print(b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
 
if n*a >= b:
  print(b)
else:
  print(n*a)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int, input().split())
print(min(N-A, B))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
-10


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
print(min(N*A, B))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())
print("B" if N+A>B else "N+A" )

Failing test case input:
7 17 120

Expected output:
119

Actual output:
N+A


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())
print(B if N*A>B else N*A )

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from sys import stdin
a, b, c = [int(x) for x in stdin.readline().rstrip().split()]
if a*b>c:
  print(a*b)
else:
  print(c)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
from sys import stdin
a, b, c = [int(x) for x in stdin.readline().rstrip().split()]
if (a*b)>c:
  print(c)
else:
  print(a*b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = list(map(int, input().split()))

min(n*a, b)


Failing test case input:
7 17 120

Expected output:
119

Actual output:

Fixed submission (verdict: Accepted):
n, a, b = list(map(int, input().split()))

print(min(n*a, b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n ,a ,b = map(int, input().split())
if a*n <= b:
    print(a*b)
else:
    print(b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
2040


Fixed submission (verdict: Accepted):
n ,a ,b = map(int, input().split())
if a*n <= b:
    print(a*n)
else:
    print(b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int,input().split())
print(max(N*A,B))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N, A, B = map(int,input().split())
print(min(N*A,B))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, B, A = map(int, input().split())
S = N*A
if B > S:
  print(S)
else:
  print(B)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
17


Fixed submission (verdict: Accepted):
N, A, B = map(int, input().split())
S = N*A
if B < S or B == S:
  print(B)
else:
  print(S)

Problem: p03501
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, a, b = map(int, input().split())

price = [a * n] + [b]
print(max(price))


Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())

price = [a * n] + [b]
print(min(price))
Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, A, B = map(int,input().split())
print(min(N + A , B))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
24


Fixed submission (verdict: Accepted):
N, A, B = map(int,input().split())
print(min(N * A , B))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B = map(int, input().split())
if N * A > B:
    print(N*A)
else:
    print(B)


Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N,A,B = map(int, input().split())
if N * A < B:
    print(N*A)
else:
    print(B)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())
print(n, a, b)
if n*a < b :
    print(n*a)
else :
    print(b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
7 17 120
119


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
if n*a < b :
    print(n*a)
else :
    print(b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
t,a,b=map(int,input().split())
if t*a > b:
    print(t*a)
else:
    print(b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
t,a,b=map(int,input().split())
if t*a < b:
    print(t*a)
else:
    print(b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
NAB = list(map(int,input().split()))
if(NAB[0]*NAB[1]>=NAB[2]):
	print(NAB[0]*NAB[1])
else:
	print(NAB[2])

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
NAB = list(map(int,input().split()))
if(NAB[0]*NAB[1]<=NAB[2]):
	print(NAB[0]*NAB[1])
else:
	print(NAB[2])

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())
print(B if N*A>B else N+A )

Failing test case input:
7 17 120

Expected output:
119

Actual output:
24


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())
print(B if N*A>B else N*A )

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b = map(int,input().split())

print(max(a*n,b))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b = map(int,input().split())

print(min(a*n,b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,A,B=map(int,input().split())

p1=N*A
if p1>=B:
    print(p1)
else:
    print(B)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
N,A,B=map(int,input().split())

p1=N*A
if p1<=B:
    print(p1)
else:
    print(B)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c = map(int, input().split())
print(a*b if a*b >= c else c)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
print(a*b if a*b <= c else c)
Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from statistics import mean, median,variance,stdev
import sys
import math

n=input().split()
a = []
for i in range(len(n)):
    a.append(int(n[i]))
if (a[0]*a[1]) > a[2]:
    print(a[0]*a[1])
else: print(a[2])

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
from statistics import mean, median,variance,stdev
import sys
import math

n=input().split()
a = []
for i in range(len(n)):
    a.append(int(n[i]))
if (a[0]*a[1]) < a[2]:
    print(a[0]*a[1])
else: print(a[2])

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split())

print(max(a*n,b))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b=map(int,input().split())

print(min(a*n,b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b = map(int,input().split())

if n * a >= b:
    print(n * a)
else:
    print(b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b = map(int,input().split())

if n * a <= b:
    print(n * a)
else:
    print(b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = [int(i) for i in input().split()]
print(max(n*a,b))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n, a, b = [int(i) for i in input().split()]
print(min(n*a,b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b = map(int, input().split())

if a*n >= b:
    print(a*n)
if a*n <= b:
    print(b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b = map(int, input().split())

if a*n >= b:
    print(b)
    exit()
if a*n <= b:
    print(a*n)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b = map(int, input().split())
if n*a > b:
  print(n*a)
else:
  print(b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b = map(int, input().split())
if n*a <= b:
  print(n*a)
else:
  print(b)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, n = map(int, input().split())
print(min((a * n), b))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
17


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
print(min((a * n), b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b = map(int, input().split())
if a * n < b:
  print(b)
else:
  print(a * b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b = map(int, input().split())
if a * n > b:
  print(b)
else:
  print(a * n)
Problem: p03501
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, a, b = map(int, input().split())
print(n * a, b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
119 120


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
print(min(n * a, b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split())
print(n*a,b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
119 120


Fixed submission (verdict: Accepted):
n,a,b=map(int,input().split())
print(min(n*a,b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())

print(n*a, b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
119 120


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())

print(min(n*a, b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=map(int,input().split());print(max(n*a,b))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b=map(int,input().split());print(min(n*a,b))

Problem: p03501
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a, b, c = map(int, input().split())
if a * b >= c:
  print(a * b)
else:
  print(c)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
a, b, c = map(int, input().split())
if a * b <= c:
  print(a * b)
else:
  print(c)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b = map(int, input().split())
if a * n > b:
  print(b)
else:
  print(a * b)

Failing test case input:
7 17 120

Expected output:
119

Actual output:
2040


Fixed submission (verdict: Accepted):
n,a,b = map(int, input().split())
if a * n > b:
  print(b)
else:
  print(a * n)

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def ABC_80_A():
    N,A,B = map(int, input().split())
    
    if A*N >= B:
        print(A*N)
    else:
        print(B)

if __name__ == '__main__':

    ABC_80_A()

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
def ABC_80_A():
    N,A,B = map(int, input().split())
    
    if A*N <= B:
        print(A*N)
    else:
        print(B)

if __name__ == '__main__':

    ABC_80_A()

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,a,b=[int(x) for x in input().split()]
print(max(n*a,b))

Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n,a,b=[int(x) for x in input().split()]
print(min(n*a,b))

Problem: p03501
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, a, b = map(int, input().split())
if n*a > b:
    print(n*a)
else:
    print(b)


Failing test case input:
7 17 120

Expected output:
119

Actual output:
120


Fixed submission (verdict: Accepted):
n, a, b = map(int, input().split())
if n*a < b:
    print(n*a)
else:
    print(b)