Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())

l = np.empty(n)
l[:] = np.nan

k = 0
i = 1

while i <= n:
  if n % i == 0:
    l[k] = i + (n // i) - 2
    k += 1
  i += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())

l = np.zeros(n)
l[:] = np.nan

k = 0
i = 1

while i <= n:
  if n % i == 0:
    l[k] = i + (n / i) - 2
    k += 1
  i += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())

l = np.zeros(n)
l[:] = np.nan

k = 0
i = 1

while i <= n ** 0.5:
  if n % i == 0:
    l[k] = i + (n / i) - 2
    k += 1
  i += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np

n = int(input())

l = np.empty(n)
l[:] = np.nan

k = 0
i = 1

while i <= n ** 0.5:
  if n % i == 0:
    l[k] = i + (n / i) - 2
   　k += 1
  i += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
import math
n = int(input())
l = np.empty(n)
l = np.nan

k = 0
i = 1
while i <= n ** 0.5:
  if n % i == 0:
    l[k] = i + (n / i) - 2
   　k += 1
  i += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
import math
n = int(input())
l = np.empty(n)
l = np.nan

k = 0
i = 1
while i <= n ** 0.5:
  if n % i == 0:
    l[k] = i + (n / i) - 2
  i += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
import math
n = int(input())
l = np.empty(n)
l = np.nan

k = 0
while i <= n ** 0.5:
  if n % i == 0:
    l[k] = i + n / i - 2
  i += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
import math
n = int(input())
l = np.empty(floor(n ** 0.5))
l = np.nan

k = 0
for i in range(1,floor(n ** 0.5)):
  if n % i == 0:
    l[k] = i + n // i - 2
    k += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
import math
n = int(input())
l = np.empty(floor(n ** 0.5))
l = np.nan

k = 0
for i in range(floor(n ** 0.5)):
  if n % i == 0:
    l[k] = i + n // i - 2
    k += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())

l = np.empty(n)
l[:] = np.nan
k = 0

for i in range(1,n):
  if n % i == 0:
    l[k] = i + (n / i)
    k += 1
print(int(np.nanmin(l) - 2))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())

l = np.empty(n)
l[:] = np.nan
k = 0
for i in range(1,n):
  if n % i == 0:
    l[k] = i + (n / i)
    k += 1
print(int(np.nanmin(l)))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())

l = np.empty(n)
l[:] = np.nan
k = 0
for i in range(1,n):
  if n % i == 0:
    l[k] = int(i + (n / i))
    k += 1
print(np.nanmin(l))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())

l = np.empty(n)
l[:] = np.nan
k = 0
for i in range(n):
  if n % i == 0:
    l[k] = int(i + (n / i))
    k += 1
print(np.min(l))

Fixed submission:
n = int(input())

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

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())

l = np.empty(n)
l[:] = np.nan

for i in range(n):
  if n % i == 0:
    l[i] = int(i + (n / i))
print(np.min(l))

Fixed submission:
n = int(input())

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