Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import copy
ans = 1
N = int(input())
A = list(map(int, input().split()))
l = []

def gcd(a,b):
    x = max(a, b)
    y = min(a, b)
    if x%y == 0:
        return y
    else:
        while x % y != 0:
            z = x%y
            x = y
            y = z
        else:
            return z
    
def gcd_list(list):
    p = 1
    for i in range(len(list)-1):
        if i == 0:
            p = gcd(list[0], list[1])
        else:
            p = gcd(z,list[i+1]) 
    return p

if N == 2:
    print(gcd(A[0], A[1]))
else:
    for i in range(N):
        l = copy.copy(A)
        l.pop(i)
        ans = max(gcd_list(l), ans)
    print(ans)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
X = [0 for i in range(N)]
Y = [0 for i in range(N)]

def gcd(a,b):
    x = max(a, b)
    y = min(a, b)
    if y == 0:
        return x
    if x % y == 0:
        return y
    else:
        return gcd(y, x%y)

for i in range(1,N):
    X[i] = gcd(X[i-1], A[i-1])

for i in range(N-1)[::-1]:
    Y[i] = gcd(Y[i+1], A[i+1])

Z = [gcd(X[i], Y[i]) for i in range(N)]

print(max(Z))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
counter = 0
m = []
def abab(l):
    for i in range(len(l)):
        m.append(abs(l[i]))
    return m

for i in range(N):
    if A[i] < 0:
        counter += 1
      
if counter % 2 == 1:
    m = abab(A)
    idx = A.index(min(m))
    m[idx] *= -1
    print(sum(m))
else:
    print(sum(abab(A)))


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
counter = 0
m = []
def abab(l):
    for i in range(len(l)):
        m.append(abs(l[i]))
    return m

for i in range(N):
    if A[i] < 0:
        counter += 1
      
if counter % 2 == 1:
    m = abab(A)
    idx = m.index(min(m))
    m[idx] *= -1
    print(sum(m))
else:
    print(sum(abab(A)))
Buggy python submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
t=[0]*(N+1)
for i in range(N):
	t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
	l, r = map(int, input().split())
	print(t[r-1] - t[l-1])
 

Fixed submission:
b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')
else:
    print('C')

Buggy python submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
t = [0] * (N+1)
for i in range(N):
    t[i+1] = t[i] + (1 if S[i : i+2] == 'AC' else 0)  
for i in range(Q):
    l, r = map(int, input().split())
    print(t[r-1] - t[l-1])



Fixed submission:
b = input()
if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'C':
    print('G')
else:
    print('C')
Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()
counter  = [0] * Q
for i in range(Q):
    l, r=map(int, input().split())
    for j in range(r-l):
        if S[l+j-1] == 'A' and S[l+j] == 'C':
            counter[i] += 1
for k in range(Q):
    print(counter[k])



Fixed submission:
N, Q = map(int, input().split())
S = input()
t=[0]*(N+1)
ans = [0] * Q
for i in range(N):
	t[i + 1] = t[i] + (1 if S[i : i + 2] == 'AC' else 0)
for i in range(Q):
	l, r = map(int, input().split())
	ans[i] = t[r-1] - t[l-1]
for i in range(Q):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(N):
    for j in range(N-i):
        if j == N-i-1:
            print(N)
        else:
            print(N,end='')

Fixed submission:
A, B = map(int,input().split())
if B % A ==0:
    print(A+B)
else:
    print(B-A)
Buggy python submission (verdict: Runtime Error):
N = int(input())
two_list = [1, 2, 4, 8, 16,32,64]
for two in two_list:
  if N > two:
  	if two == 64:
    	print(64)
  else:
    print(two)
    exit()
    

Fixed submission:
N = int(input())
two_list = [1, 2, 4, 8, 16,32,64]
answer = 0
for two in two_list:
  if N >= two:
      answer = two
      if two == 64:
          print("64")
  else:
    print(answer)
    exit()
Buggy python submission (verdict: Runtime Error):
if A==B==C:
    print(-1)
else:
    for i in range(100000000):
        if A %2==0 and B%2==0 and C%2==0:
            a = A/2
            b = B/2
            c = C/2
            A = b+c
            B = a+c
            C = a+b
        else:
            print(i)
            exit()

Fixed submission:
A, B, C = map(int, input().split())

if A==B==C:
    if A%2==0:
        print(-1)
    else:
        print(0)

else:
    for i in range(1000000000):
        if A %2==0 and B%2==0 and C%2==0:
            a = A/2
            b = B/2
            c = C/2
            A = b+c
            B = a+c
            C = a+b
        else:
            print(i)
            exit()
Buggy python submission (verdict: Runtime Error):
L , N = map(int, input().split())
S = [input() for i in range(N)]
S = sorted(S)
print("".join(S))

Fixed submission:
N , L = map(int, input().split())
S = [input() for i in range(N)]
S = sorted(S)
print(*S,sep='')

Buggy python submission (verdict: Runtime Error):
L , N = map(int, input().split())
S = [input() for i in range(N)]
S = sorted(S)
print(*S,sep="")

Fixed submission:
N , L = map(int, input().split())
S = [input() for i in range(N)]
S = sorted(S)
print(*S,sep='')

Buggy python submission (verdict: Runtime Error):
L , N = map(int, input().split())
S = [input() for i in range(N)]
S = sorted(S)
print(*S,sep='')
    

Fixed submission:
N , L = map(int, input().split())
S = [input() for i in range(N)]
S = sorted(S)
print(*S,sep='')
Buggy python submission (verdict: Time Limit Exceeded):
K,N=map(int, input().split())
A=list(map(int, input().split()))
max_diff = 0
for i in range(0,N):
    for j in range(i,N):
        ck = abs(A[j] - A[i])
        if max_diff < ck:
            if ck <= K/2:
                max_diff = ck
print(max_diff)


Fixed submission:
K,N=map(int, input().split())
A=list(map(int, input().split()))
max_diff = 0
ck = 0
for i in range(0,N):
    if i == N -1:
        ck = abs(A[(i+1)%N] + K  - A[i])
    else:
        ck = abs(A[(i+1)%N] - A[i])
    if max_diff < ck:
        max_diff = ck
print(K - max_diff)
Buggy python submission (verdict: Runtime Error):
h, w=map(int, input().split())
if h == 1 and w ==:
    print(1)
elif w == 1:
    print(1)
elif (h * w) % 2 ==1:
    print(int((h * w //2) + 1))
else:
    print(int(h * w //2))

Fixed submission:
h, w=map(int, input().split())
if h == 1 or w ==1:
    print(1)
elif (h * w) % 2 ==1:
    print(int((h * w //2) + 1))
else:
    print(int(h * w //2))
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int, input().split())
if int(sqrt(a))+int(sqrt(b)) < int(sqrt(c)):
    print("Yes")
else:
    print("No")



Fixed submission:
from math import sqrt
from decimal import *

a,b,c=map(int, input().split())
if Decimal(a).sqrt()+Decimal(b).sqrt() < Decimal(c).sqrt():
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
import sys
a,b=map(int, input().split())

x = math.floor(a/0.08)
#1の位が1-9
y = math.floor(b/0.1)
if (x + 1) * 0.08 == a:
    xx = x + 2
else:
    xx = x + 1

for i in range(y,y+10):
    for j in range(x, xx):
        if i == j:
            print(i)
            sys.exit(0)
print(-1)
      

Fixed submission:
# -*- coding: utf-8 -*-
n, a,b=map(int, input().split()) 
X = n//(a+b)
Y = n%(a+b)
if Y > a:
    print(X*a + a)
else:
    print(X*a + Y)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
import sys
a,b=map(int, input().split())

x = math.floor(a/0.08)
#1の位が1-9
y = math.floor(b/0.1)
if (x + 1) * 0.08 == a:
    xx = x + 2
else:
    xx = x + 1

for i in range(y,y+10):
    for j in range(x, xx):
        if i == j:
            print(i)
            sys.exit(1)
print(-1)
      

Fixed submission:
# -*- coding: utf-8 -*-
import math
import sys
a,b=map(int, input().split())

y = math.floor(b/0.1)

for i in range(y,y+10):
    if math.floor(i * 0.08) == a:
        print(i)
        sys.exit(0)
print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

n=int(input())  #数値入力 「N」だけの入力のとき
i=0
lst ={}
while i < n: 
    s = input()
    if s not in lst:
        lst[s]=1
    else:
        lst[s]+=1
    i+=1

max_lst = [kv[0] for kv in lst.items() if kv[1] == max(lst.values())]
max_lst.sort()
for i in max_lst:
    print(i)
# ans = sorted(lst.items(), key=lambda x:x[1])
# for key in ans:
#     print(key)


Fixed submission:
# -*- coding: utf-8 -*-

n=int(input())  #数値入力 「N」だけの入力のとき
i=0
lst ={}
while i < n: 
    s = input()
    if s not in lst:
        lst[s]=1
    else:
        lst[s]+=1
    i+=1
maxi = max(lst.values())
res = []
for i,j in lst.items():
    if j == maxi:
       res.append(i) 
res.sort()
for i in res:
     print(i)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n=int(input())  #数値入力 「N」だけの入力のとき
a=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
f = 0
for i in range(0,n):
    if a[i] in a[i+1:]:
        print("NO")
        f = 1
        break
if f ==0:
    print("YES")

Fixed submission:
# -*- coding: utf-8 -*-
n=int(input())  #数値入力 「N」だけの入力のとき
a=list(map(int, input().split()))  #リスト入力 「a1 a2 a3 ...」みたいな配列のような入力のとき
f = 0
if len(a) != len(set(a)):
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
import sys
n,k=map(int, input().split())
h=list(map(int, input().split()))
b =sorted(h, reverse=True)
#必殺技の消費
for i in range(0,k):
    if len(b) != 0:
        b.pop(0)
    else:
        print(0)
        sys.exit()

#攻撃回数
print(sum(b))

Fixed submission:
# -*- coding: utf-8 -*-
n,k=map(int, input().split())
h=list(map(int, input().split()))
b =sorted(h)
if k != 0:
    b = b[:-k]
#攻撃回数
print(sum(b))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

n=int(input())
p = list(map(int, input().split()))

result = []
c = 0
for i in range(0,n):
    flag = 0
    if smallest >= p[i]:
        c += 1
        smallest = p[i]

print(c)

Fixed submission:
# -*- coding: utf-8 -*-

n=int(input())
p = list(map(int, input().split()))

result = []
c = 0
smallest = p[0]
for i in range(0,n):
    flag = 0
    if smallest >= p[i]:
        c += 1
        smallest = p[i]

print(c)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
n = int(input())
a=list(map(int, input().split()))


b = {}
for i in range(0,n):
    for j,x in enumerate(a):
        if x == i+1:
            print(str(j+1)+" ",end="")
            break


Fixed submission:
# -*- coding: utf-8 -*-
n = int(input())
a=list(map(int, input().split()))

#ソートして配列番号を持ってくる
b = {}
for index,x in enumerate(a):
    b[x] = index

ans = sorted(b.items(), key=lambda x: x[0])
for k,v in ans:
     print(str(v+1)+" ",end="")
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input.split())
print(A*B)

Fixed submission:
A, B = map(int, input().split())
print(A*B)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = map(int, input().split())
if 0 in a:
  print(0)
  exit()
for i in a:
  num = num*i
  if num > 10**18:
    print(-1)
    exit()
print(num)

Fixed submission:
N = int(input())
a = [int(i) for i in input().split()]
if 0 in a:
  print(0)
  exit()
num = 1
for i in a:
  num = num*i
  if num > 10**18:
    print(-1)
    exit()
print(num)
Buggy python submission (verdict: Runtime Error):
a, b = input().split()
a = int(a)
b_i = int(b[:-3])
b_f = int(b[-2:])
if b_f == 0:
  print(a*b_i)
  exit()
b_m = a*b_f
print(a*b_i + int(str(b_m)[:-2]))

Fixed submission:
a, b = input().split()
a = int(a)
b_i = int(b[:-3])
b_f = int(b[-2:])
if b_f == 0:
  print(a*b_i)
  exit()
b_m = a*b_f
if b_m < 100:
  print(a*b_i)
  exit()
print(a*b_i + int(str(b_m)[:-2]))

Buggy python submission (verdict: Runtime Error):
a, b = input().split()
a = int(a)
b_i = int(b[:-3])
b_f = int(b[-2:])
b_m = a*b_f
print(a*b_i + int(str(b_m)[:-2]))

Fixed submission:
a, b = input().split()
a = int(a)
b_i = int(b[:-3])
b_f = int(b[-2:])
if b_f == 0:
  print(a*b_i)
  exit()
b_m = a*b_f
if b_m < 100:
  print(a*b_i)
  exit()
print(a*b_i + int(str(b_m)[:-2]))
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
A = list(map(int, input().split()))
v = []
now = 0
for i in range(K):
  p = A[now]
  now = p-1
  if p in v:
    j = v.index(p)
    df = i-j
    Kn = (K-i-1) % df
    p = v[j+Kn]
    break
  else:
    v.append(p)
print(p)

Fixed submission:
s = input()
t = input()

if len(s)+1 == len(t) and s == t[:len(s)]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = list(map(int, input().split()))
v = []
now = 0
for i in range(K):
  p = A[now]
  now = p-1
  if p in v:
    j = v.index(p)
    df = i-j
    Kn = (K-i-1) % df
    p = v[j+Kn]
    break
  else:
  	v.append(p)
print(p)

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
v = []
w = {}
now = 0
for i in range(K):
  p = A[now]
  now = p-1
  if p in w:
    j = v.index(p)
    df = i-j
    Kn = (K-i-1) % df
    p = v[j+Kn]
    break
  else:
    v.append(p)
    w[p] = p
print(p)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = list(map(int, input().split()))
v = []
now = 0
for i in range(K):
  p = A[now]
  now = p-1
  if p in v:
    j = v.index(p)
    df = i-j
    Kn = (K-i-1) % df
    for k in range(Kn):
      p = A[now]
      now = p-1
    break
  else:
    v.append(p)
print(p)

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
v = []
w = {}
now = 0
for i in range(K):
  p = A[now]
  now = p-1
  if p in w:
    j = v.index(p)
    df = i-j
    Kn = (K-i-1) % df
    p = v[j+Kn]
    break
  else:
    v.append(p)
    w[p] = p
print(p)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = [int(a) for a in input().split()]
cnt = 0
for i in range(N):
  for j in range(i+1, N):
    d = A[i] + A[j] - (j-i)
    if d == 0:
      cnt += 1
print(cnt)

Fixed submission:
s = input()
if s == "ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
print(a*b)

Fixed submission:
a, b = list(map(int, input().split()))
print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
ans = 1
n = list(map(int, input().split()))
for i in range(a):
    ans = ans * n[i]
    if n[i] == 0:
        ans = 0
        break
print(ans if ans <= 10**18 else -1)

Fixed submission:
a = int(input())
ans = 1
n = list(map(int, input().split()))
for i in range(a):
    if ans <= 10**18:
        ans = ans * n[i]
    if n[i] == 0:
        ans = 0
        break
print(ans if ans <= 10**18 else -1)

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
ans = 1
n = list(map(int, input().split()))
for i in range(a):
    ans = ans * n[i]
print(ans if ans<=10**18 else '-1')

Fixed submission:
a = int(input())
ans = 1
n = list(map(int, input().split()))
for i in range(a):
    if ans <= 10**18:
        ans = ans * n[i]
    if n[i] == 0:
        ans = 0
        break
print(ans if ans <= 10**18 else -1)
Buggy python submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split())
print(min(a, k, a-(k-a-b))

Fixed submission:
a, b, c, k = map(int, input().split())
print(min(a, k, a*2+b-k))

Buggy python submission (verdict: Runtime Error):
l = list(map(int, input().split()))
lists = [1]*l[0] + [0]*l[1] + [-1]*l[2]
sum = 0
for i in range(l[3]):
    sum += lists[i]
print(sum)

Fixed submission:
a, b, c, k = map(int, input().split())
print(min(a, k, a*2+b-k))

Buggy python submission (verdict: Runtime Error):
l = map(int, input().split())
lists = [1]*l[0] + [0]*l[1] + [-1]*l[2]
sum = 0
for i in range(l[3]):
    sum += lists[i]
print(sum)

Fixed submission:
a, b, c, k = map(int, input().split())
print(min(a, k, a*2+b-k))
Buggy python submission (verdict: Runtime Error):
l = input().split()
a, b = l[0], l[1]
if (a*b)%2 == 0:
	print("Even")
else
	print("Odd")

Fixed submission:
l = input().split()
a, b = int(l[0]), int(l[1])
if (a*b)%2 == 0:
	print("Even")
else:
	print("Odd")

Buggy python submission (verdict: Runtime Error):
l = input().split()
if (l[0] * l[1]) % 2 == 0 :
	print("Even")
else
	print("Odd")

Fixed submission:
l = input().split()
a, b = int(l[0]), int(l[1])
if (a*b)%2 == 0:
	print("Even")
else:
	print("Odd")
Buggy python submission (verdict: Runtime Error):
a, b , c = -1,-1,-1
n, y = map(int,input().split())
for i in range(n+1):
    for j in range(n+1):
        if i+ j > n:
            break
        else ((y - (i*10000 + j*5000))%1000 == 0) and ((i+j+(y - (i*10000 + j*5000))/1000) == n):
            if (y - (i*10000 + j*5000))/1000 >= 0:
                a,b,c = i, j, int((y - i*10000 - j*5000)/1000)
                break
print(a, b, c)

Fixed submission:
a, b , c = -1,-1,-1
n, y = map(int,input().split())
for i in range(n+1):
    for j in range(n+1):
        if i+ j > n:
            break
        elif ((y - (i*10000 + j*5000))%1000 == 0) and ((i+j+(y - (i*10000 + j*5000))/1000) == n):
            if (y - (i*10000 + j*5000))/1000 >= 0:
                a,b,c = i, j, int((y - i*10000 - j*5000)/1000)
                break
print(a, b, c)

Buggy python submission (verdict: Time Limit Exceeded):
a, b , c = -1,-1,-1
n, y = map(int,input().split())
for i in range(n+1):
    for j in range(n+1):
        if ((y - (i*10000 + j*5000))%1000 == 0) and ((i+j+(y - (i*10000 + j*5000))/1000) == n):
            if (y - (i*10000 + j*5000))/1000 >= 0:
                a,b,c = i, j, int((y - i*10000 - j*5000)/1000)
                break
print(a, b, c)

Fixed submission:
a, b , c = -1,-1,-1
n, y = map(int,input().split())
for i in range(n+1):
    for j in range(n+1):
        if i+ j > n:
            break
        elif ((y - (i*10000 + j*5000))%1000 == 0) and ((i+j+(y - (i*10000 + j*5000))/1000) == n):
            if (y - (i*10000 + j*5000))/1000 >= 0:
                a,b,c = i, j, int((y - i*10000 - j*5000)/1000)
                break
print(a, b, c)

Buggy python submission (verdict: Runtime Error):
    a, b , c = -1,-1,-1
    n, y = map(int,input().split())
    for i in range(n+1):
        for j in range(n+1):
            if ((y - (i*10000 + j*5000))%1000 == 0) and ((i+j+(y - (i*10000 + j*5000))/1000) == n):
                if (y - (i*10000 + j*5000))/1000 >= 0:
                    a,b,c = i, j, int((y - i*10000 - j*5000)/1000)
                    break
    print(a, b, c)

Fixed submission:
a, b , c = -1,-1,-1
n, y = map(int,input().split())
for i in range(n+1):
    for j in range(n+1):
        if i+ j > n:
            break
        elif ((y - (i*10000 + j*5000))%1000 == 0) and ((i+j+(y - (i*10000 + j*5000))/1000) == n):
            if (y - (i*10000 + j*5000))/1000 >= 0:
                a,b,c = i, j, int((y - i*10000 - j*5000)/1000)
                break
print(a, b, c)
Buggy python submission (verdict: Runtime Error):
    s = input()
    for i in range(8):
        total = int(s[0])
        str = s[0]
        for j in range(1, 4):
            if i >> (j - 1) & 1:
                total += int(s[j])
                str += '+' + s[j]
            else:
                total -= int(s[j])
                str += '-' + s[j]
        if total == 7:
            print(str + '=7')
            exit()

Fixed submission:
s = input()
ans = 'inf'
for i in range(8):
    total = int(s[0])
    str = s[0]
    for j in range(3):
        if i>>j&1:
            total += int(s[j+1])
            str += '+' + s[j+1]
        else:
            total -= int(s[j+1])
            str += '-' + s[j+1]
    if total == 7:
        print(str + '=7')
        exit()
Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = float('inf')
temp = 0
for i in range(1,n**(1/2)):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))

Fixed submission:
n = int(input())
ans = float('inf')
temp = 0
for i in range(int(n**(1/2)), 0, -1):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = float('inf')
temp = 0
for i in range(1,(n//2)+2):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))

Fixed submission:
n = int(input())
ans = float('inf')
temp = 0
for i in range(int(n**(1/2)), 0, -1):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = float('inf')
temp = 0
for i in range(1,(n//2)+2):
    if n%i == 0:
        temp = max(len(str(i)), len(str(n//i)))
        ans = min(temp, ans)
print(ans)

Fixed submission:
n = int(input())
ans = float('inf')
temp = 0
for i in range(int(n**(1/2)), 0, -1):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))

Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = float('inf')
temp = 0
for i in range(1,(n/2)+1):
    if n%i == 0:
        temp = max(len(str(i)), len(str(n//i)))
        ans = min(temp, ans)
print(ans)

Fixed submission:
n = int(input())
ans = float('inf')
temp = 0
for i in range(int(n**(1/2)), 0, -1):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))

Buggy python submission (verdict: Runtime Error):
n = int(input())
ans = float('inf')
temp = 0
for i in range(1,n/2+1):
    if n%i == 0:
        temp = max(len(str(i)), len(str(n//i)))
        ans = min(temp, ans)
print(ans)

Fixed submission:
n = int(input())
ans = float('inf')
temp = 0
for i in range(int(n**(1/2)), 0, -1):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = float('inf')
temp = 0
for i in range(1,n+1):
    if n%i == 0:
        temp = max(len(str(i)), len(str(n//i)))
        ans = min(temp, ans)
print(ans)

Fixed submission:
n = int(input())
ans = float('inf')
temp = 0
for i in range(int(n**(1/2)), 0, -1):
    if n%i == 0:
        temp = max(i, n//i)
        ans = min(temp, ans)
print(len(str(ans)))
Buggy python submission (verdict: Runtime Error):
k, s = list(map(int, input().split()))
count = 0
for i in range(k+1):
    for j in range(k+1):
        for n in range(k+1):
            if (i+j+n == k):
                count += 1
print(count)

Fixed submission:
k, s = map(int,input().split())
count = 0
for i in range(k+1):
    for j in range(k+1):
            if 0<=(s-i-j)<=k:
                count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
k, s = list(map(int, input().split()))
count = 0
for i in range(k+1):
    for j in range(k+1):
        if (s-i-j <= k) and (0 <= s-i-j):
            count += 1
print(count)

Fixed submission:
k, s = map(int,input().split())
count = 0
for i in range(k+1):
    for j in range(k+1):
            if 0<=(s-i-j)<=k:
                count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
k, s = list(map(int, input().split()))
count = 0
for i in range(2,k+1):
    for j in range(2,k+1):
        if (s-i-j <= k) and (0 <= s-i-j):
            count += 1
print(count)

Fixed submission:
k, s = map(int,input().split())
count = 0
for i in range(k+1):
    for j in range(k+1):
            if 0<=(s-i-j)<=k:
                count += 1
print(count)