Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
S = input(), T = input()
A,B = map(int,input().split())	
U = input()

if S == U:
    A -= 1
    print(A,B)
else:
    B -= 1
    print(A,B)

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

if li[1] == U:
    B -= 1
    print(A,B)
else:
    A -= 1
    print(A,B)
Buggy python submission (verdict: Runtime Error):
a,b=input().split()
if (a=="1" and b=="2")or(a=="2" and b=="1"):
	print("3")
if (a=="1" and b=="3")or(a=="3" and b=="1"):
	print("2")
if (a=="3" and b=="2")or(a=="2" and b=="3"):
	print("1")

Fixed submission:
a=input()
b=input()
if (a=="1" and b=="2")or(a=="2" and b=="1"):
	print("3")
if (a=="1" and b=="3")or(a=="3" and b=="1"):
	print("2")
if (a=="3" and b=="2")or(a=="2" and b=="3"):
	print("1")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
ans=1
for i in a:
  if i!=0:
    ans=ans*i
  else:
    print(0)
    quit()
print(ans if ans<=10**18 else -1)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
count=a.count(0)
if count>0:
  print(0)
  quit()
else:
  for i in a:
    ans=ans*i
    if ans>10**18:
      print(-1)
      quit()
print(ans)

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

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
ans=1
count=a.count(0)
if count>0:
  print(0)
  quit()
else:
  for i in a:
    ans=ans*i
    if ans>10**18:
      print(-1)
      quit()
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
counts=0
limit=0
for i in range(1,N+1):
  a=A.count(i)
  counts+=1
  limit+=a
  print(a)
  if a==N:
    quit()
for j in range(N-counts):
  print(0)

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a={}
for i in range(1,N+1):
  a.update({i:0})
for j in A:
  a[j]+=1
for k,l in a.items():
  print(l)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
for i in range(1,N+1):
  print(A.count(i))

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
a={}
for i in range(1,N+1):
  a.update({i:0})
for j in A:
  a[j]+=1
for k,l in a.items():
  print(l)
Buggy python submission (verdict: Runtime Error):
l,m,n = map(int,input().split())
ans='No'
if l==7 or m==7 or n==7:
  ans='Yes'
print(ans)

Fixed submission:
N=str(input())
ans='No'
if int(N[0])==7 or int(N[1])==7 or int(N[2])==7:
  ans='Yes'
print(ans)

Buggy python submission (verdict: Runtime Error):
l,m,n = map(int,input().split())
ans='No'
if l==7 or m==7 or n==7:
  ans='Yes'
print(ans)

Fixed submission:
N=str(input())
ans='No'
if int(N[0])==7 or int(N[1])==7 or int(N[2])==7:
  ans='Yes'
print(ans)

Buggy python submission (verdict: Runtime Error):
N=int(input())
ans='No'
if N[0]==7 or N[1]==7 or N[2]== 7:
  ans = 'Yes'
print(ans)

Fixed submission:
N=str(input())
ans='No'
if int(N[0])==7 or int(N[1])==7 or int(N[2])==7:
  ans='Yes'
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce
def gcd(*numbers):
  return reduce(math.gcd,numbers)
K=int(input())
a=list(range(1,K+1))
b=list(range(1,K+1))
c=list(range(1,K+1))
ans=0
for j in a:
  for k in b:
    for l in c:
      ans+=gcd(j,k,l)
print(ans)

Fixed submission:
import math
K=int(input())
ans=0
for j in range(1,K+1):
  for k in range(1,K+1):
    a=math.gcd(j,k)
    for l in range(1,K+1):
      ans+=math.gcd(a,l)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=input()
a=S.count('R')
b=S.count('G')
c=S.count('B')
ans=a*b*c
for i in range(N-2):
  for j in range(i+1,N-1):
    if S[i]!=S[j]:
      if (2*j-i)<=N-1:
        if S[i]!=S[2*j-i]!=S[j]:
          ans-=1
print(ans)

Fixed submission:
N=int(input())
S=input()
a=S.count('R')
b=S.count('G')
c=S.count('B')
ans=a*b*c
for i in range(N-2):
  for j in range(i+1,N-1):
    if S[i]!=S[j]:
      if (2*j-i)<=N-1 and S[i]!=S[2*j-i]!=S[j]:
        ans-=1     
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=input()
a=S.count('R')
b=S.count('G')
c=S.count('B')
ans=a*b*c
for i in range(N):
  for j in range(i+1,N-1):
    if S[i]!=S[j]:
      if (2*j-i)<=N-1:
        if S[i]!=S[2*j-i]!=S[j]:
          ans-=1
print(ans)

Fixed submission:
N=int(input())
S=input()
a=S.count('R')
b=S.count('G')
c=S.count('B')
ans=a*b*c
for i in range(N-2):
  for j in range(i+1,N-1):
    if S[i]!=S[j]:
      if (2*j-i)<=N-1 and S[i]!=S[2*j-i]!=S[j]:
        ans-=1     
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=input()
a=S.count('R')
b=S.count('G')
c=S.count('B')
ans=a*b*c
for i in range(N):
  for j in range(i+1,N):
    if S[i]!=S[j]:
      if (2*j-i)<=N-1:
        if S[i]!=S[2*j-i] and S[j]!=S[2*j-i]:
          ans-=1
print(ans)

Fixed submission:
N=int(input())
S=input()
a=S.count('R')
b=S.count('G')
c=S.count('B')
ans=a*b*c
for i in range(N-2):
  for j in range(i+1,N-1):
    if S[i]!=S[j]:
      if (2*j-i)<=N-1 and S[i]!=S[2*j-i]!=S[j]:
        ans-=1     
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
S=list(str(input()))
ans=0
for i in range(N):
  for j in range(i+1,N-1):
    if S[i] != S[j]:
      for k in range(j+1,N):
        if S[i]!=S[k] and S[j]!=S[k]:
          if j-i!=k-j:
            ans+=1
print(ans)

Fixed submission:
N=int(input())
S=input()
a=S.count('R')
b=S.count('G')
c=S.count('B')
ans=a*b*c
for i in range(N-2):
  for j in range(i+1,N-1):
    if S[i]!=S[j]:
      if (2*j-i)<=N-1 and S[i]!=S[2*j-i]!=S[j]:
        ans-=1     
print(ans)
Buggy python submission (verdict: Runtime Error):
N,K=map(int,input().split())
if K==0:
  ans=N
elif N%K==0 and K%N==0:
  ans=0
else:
  if N%2==0:
    ans=min(N,abs(N-K))
  else:
    ans=1
print(ans)

Fixed submission:
N,K=map(int,input().split())
ans=min(N,N%K,abs(N%K-K))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
B=set(A)
ans=0
for i in B:
  counts=A.count(i)
  ans+=(counts)*(counts-1)/2
for k in A:
  counts2=A.count(k)
  print(int(ans-counts2+1))

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
dic={}
for i in A:
  if i not in dic.keys():
    dic.update({i:1})
  else:
    dic[i]+=1
ans=sum([int(j*(j-1)/2) for j in dic.values()])
for k in A:
  num=dic[k]
  if num>=1:
    print(int(ans-num+1))
  else:
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
keys=[]
values=[]
ans=0
for i in A:
  if i in keys:
    pass
  else:
    counts=A.count(i)
    keys.append(i)
    values.append(counts)
    ans+=(counts)*(counts-1)/2
for k in A:
  a=keys.index(k)
  print(int(ans-values[a]+1))

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
dic={}
for i in A:
  if i not in dic.keys():
    dic.update({i:1})
  else:
    dic[i]+=1
ans=sum([int(j*(j-1)/2) for j in dic.values()])
for k in A:
  num=dic[k]
  if num>=1:
    print(int(ans-num+1))
  else:
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
keys=[]
values=[]
for i in A:
  if i in keys:
    pass
  else:
    counts=A.count(i)
    keys.append(i)
    values.append(counts)
ans=0
for j in values:
  ans+=j*(j-1)/2
for k in A:
  a=keys.index(k)
  print(int(ans-values[a]+1))

Fixed submission:
N=int(input())
A=list(map(int,input().split()))
dic={}
for i in A:
  if i not in dic.keys():
    dic.update({i:1})
  else:
    dic[i]+=1
ans=sum([int(j*(j-1)/2) for j in dic.values()])
for k in A:
  num=dic[k]
  if num>=1:
    print(int(ans-num+1))
  else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
ans=0
if A>=N:
  ans=N
elif A<N<=A+B:
  ans=A
elif N>A+B:
  num=int(N/(A+B))
  ans=num*A+N-(A+B)*num
  if n-(A+B)*num>=A:
    ans=(num+1)*A
print(ans)



Fixed submission:
N,A,B=map(int,input().split())
num=N//(A+B)
rest=min(N%(A+B),A)
ans=num*A+rest
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(input().split())
ans='YES'
for i in range(N):
  if A.count(A[i])>=2:
    ans='NO'
    break
print(ans)

Fixed submission:
N=int(input())
A=list(input().split())
B=list(set(A))
ans='YES'
if len(A)!=len(B):
  ans='NO'   
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
ans=0
if N<=K:
  pass
else:
  A=list(map(int,input().split()))
  for i in range(N-K):
    ans+=min(A)
    A.remove(min(A))  
print(ans)

Fixed submission:
N,K=map(int,input().split())
ans=0
if N<=K:
  pass
else:
  A=list(map(int,input().split()))
  A.sort()
  ans=sum(A[:N-K])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
ans=0
if N<K:
  pass
else:
  A=list(map(int,input().split()))
  for i in range(N-K):
    ans+=min(A)
    A.remove(min(A))  
print(ans)

Fixed submission:
N,K=map(int,input().split())
ans=0
if N<=K:
  pass
else:
  A=list(map(int,input().split()))
  A.sort()
  ans=sum(A[:N-K])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
A=list(map(int,input().split()))
ans=0
if N<K:
  pass
else:
  for i in range(N-K):
    ans+=min(A)
    A.remove(min(A))  
print(ans)

Fixed submission:
N,K=map(int,input().split())
ans=0
if N<=K:
  pass
else:
  A=list(map(int,input().split()))
  A.sort()
  ans=sum(A[:N-K])
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,K=map(int,input().split())
A=list(map(int,input().split()))
if N<K:
  ans=0
else:
  for i in range(K):
    A.remove(max(A))
  ans=sum(A)
print(ans)

Fixed submission:
N,K=map(int,input().split())
ans=0
if N<=K:
  pass
else:
  A=list(map(int,input().split()))
  A.sort()
  ans=sum(A[:N-K])
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
d = list(map(int, input().split()))
count = 0
for i in range(len(d)):
    for j in range(i+1, len(d)):
        count += d[i] * d[j]
print(count)

Fixed submission:
x, y = map(int, input().split())
output =  0 if x <= 2 * y else x - 2 * y
print(output)
Buggy python submission (verdict: Runtime Error):
n = int(input())
d = list(map(int, input().split()))
count = 0
for i in range(len(d)):
    for j in range(i+1, len(d)):
        count += d[i] * d[j]
print(count)7

Fixed submission:
n = int(input())
d = list(map(int, input().split()))
count = 0
for i in range(len(d)):
    for j in range(i+1, len(d)):
        count += d[i] * d[j]
print(count)
Buggy python submission (verdict: Runtime Error):
def factorization(n):
    if n == 1:
        return []
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append(i)
    if temp != 1:
        arr.append(temp)
    if not arr:
        arr.append(n)
    return arr


input_values = list(map(int, input().split()))
print(len(list(set(factorization(input_values[0])) & set(factorization(input_values[1])))) + 1)

Fixed submission:
x = int(input())
y = 0.5 if x % 2 == 0 else  (x + 1) / 2 / x
print(y)
Buggy python submission (verdict: Runtime Error):
import re

num, lim = input().split()
x = re.split(' +', input())
if len(x) > num:
    print(0)
else:
    print(len([person for person in x if person >= lim]))

Fixed submission:
num, lim = map(int, input().split())
x = map(int, input().split())
print(len([person for person in x if person >= lim]))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
stu = list(map(int, input().split()))


for i in range(1, n+1):
    print(stu.index(i) + 1, end=' ')
print('')

Fixed submission:
import numpy as np

n = int(input())
stu = list(map(int, input().split()))
stu = np.argsort(stu)

[print(i + 1, end=" ") for i in stu]
print()
Buggy python submission (verdict: Runtime Error):
a=input()
b=eval(input().replace(" ","*"))
print(-1 if b>10**18 else b)

Fixed submission:
_=input()
A=sorted(list(map(int,input().split())))
B=1
for a in A:
    B*=a
    if B>10**18:
        B=-1
        break
print(B)

Buggy python submission (verdict: Runtime Error):
_=input()
A=eval('*'.join(input().split()))
print(-1 if A>1000000000000000000 else A)

Fixed submission:
_=input()
A=sorted(list(map(int,input().split())))
B=1
for a in A:
    B*=a
    if B>10**18:
        B=-1
        break
print(B)

Buggy python submission (verdict: Runtime Error):
_=input()
A=eval('*'.join(input().split()))
print(-1 if A>10**18 else A)

Fixed submission:
_=input()
A=sorted(list(map(int,input().split())))
B=1
for a in A:
    B*=a
    if B>10**18:
        B=-1
        break
print(B)

Buggy python submission (verdict: Runtime Error):
N=int(input())
a=eval(input().replace(' ','*'))
print('-1' if a>10**18 else a)

Fixed submission:
_=input()
A=sorted(list(map(int,input().split())))
B=1
for a in A:
    B*=a
    if B>10**18:
        B=-1
        break
print(B)

Buggy python submission (verdict: Runtime Error):
N=int(input())
a=eval(input().replace(' ','*'))
print(-1 if a>10**18 else a)

Fixed submission:
_=input()
A=sorted(list(map(int,input().split())))
B=1
for a in A:
    B*=a
    if B>10**18:
        B=-1
        break
print(B)

Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
x=1
for a in list(map(int,input().split())):
    x*=a
print(-1 if x>10**18 else x)

Fixed submission:
_=input()
A=sorted(list(map(int,input().split())))
B=1
for a in A:
    B*=a
    if B>10**18:
        B=-1
        break
print(B)
Buggy python submission (verdict: Runtime Error):
A,B,H,M=map(int,input().split())
x=360*(H+M/60)/12-360*M/60
cos=math.cos(math.radians(x))
C = A**2 + B**2 - 2*A*B*(cos)
print(C**0.5)

Fixed submission:
import math
A,B,H,M=map(int,input().split())
x=360*(H+M/60)/12-360*M/60
cos=math.cos(math.radians(x))
C = A**2 + B**2 - 2*A*B*(cos)
print(C**0.5)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,N=map(int,input().split())
ans=0
for i in range(max(1,N-B+1),N+1):
    ans=max(ans,((A*i)//B - A*(i//B)))
print(ans)

Fixed submission:
A,B,N=map(int,input().split())
x=(N//B)*B-1
ans=(A*N)//B - A*(N//B)
if N>=B:
    ans=max(ans, (A*x)//B - A*(x//B))
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce
import itertools

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
ans = 0

seq = [i for i in range(1, k+1)]
b = list(itertools.combinations_with_replacement(seq,3))

for a in b:
    if a[0] == a[1] == a[2]:
        ans += gcd(a[0], a[1], a[2])
    else:
        ans += gcd(a[0], a[1], a[2])*(n+1)
print(ans)

Fixed submission:
from math import gcd
 
n = int(input())
 
ans = 0
 
for i in range(1,n+1):
  for j in range(1,n+1):
    for k in range(1,n+1):
      ans += gcd(gcd(i,j),k)
      
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

k = int(input())
ans = 0

for i in range(1, k+1):
    for j in range(1, k+1):
        for k in range(1, k+1):
            ans += gcd(i, j, k)

print(ans)

Fixed submission:
from math import gcd
 
n = int(input())
 
ans = 0
 
for i in range(1,n+1):
  for j in range(1,n+1):
    for k in range(1,n+1):
      ans += gcd(gcd(i,j),k)
      
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
while n ** 2 >= (n - k) ** 2:
    n -= k
print(n if n >= 0 else n * (-1))

Fixed submission:
n, k = map(int, input().split())
x = n % k
while x ** 2 >= (x - k) ** 2:
    x -= k
print(x if x >= 0 else x * (-1))
Buggy python submission (verdict: Runtime Error):
N,A,B=map(int,input().split())
print(min(N*A,B)

Fixed submission:
N,A,B=map(int,input().split())
print(min(N*A,B))
Buggy python submission (verdict: Runtime Error):
A=int(intput())
print('Yes' if A in list(range(3,8,2)) else 'No')

Fixed submission:
X=int(input())
print('YES' if X in [7,5,3] else 'NO')
Buggy python submission (verdict: Time Limit Exceeded):
a,b,k= map(int, input().split())
x = sorted(list(i for i in range(a, b+1)))
y = sorted(list(set(x[:k]+x[-k:])))
for i in y:
    print(i)

Fixed submission:
a,b,k= map(int, input().split())
c = min(k, b-a+1)
x = [a+i for i in range(c)]
y = [b-i for i in range(c)]
z = sorted(list(set(x+y)))
for i in z:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,k= map(int, input().split())
x = sorted(list(i for i in range(a, b+1)))
y = sorted(list(set(x[:k]+x[-k:])))
for i in y:
    print(i)

Fixed submission:
a,b,k= map(int, input().split())
c = min(k, b-a+1)
x = [a+i for i in range(c)]
y = [b-i for i in range(c)]
z = sorted(list(set(x+y)))
for i in z:
    print(i)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a, b = map(int, list(str(n)))

print('Yes' if n%(a+b)==0 else 'No')

Fixed submission:
n = list(input())
x = int(''.join(n))
y = sum(map(int, n))

print('Yes' if x%y==0 else 'No')
Buggy python submission (verdict: Runtime Error):
a = input().split()
print('YES' if list(a[0]) == list(reversed(a[1])) else 'NO')

Fixed submission:
a,b = (input() for _ in range(2))
print('YES' if list(a) == list(reversed(b)) else 'NO')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = 1
for i in range(1, n+1):
    p *= i
print(p%(10**9+7))

Fixed submission:
import math
n = int(input())
power = math.factorial(n)
print(power%(10**9+7))
Buggy python submission (verdict: Runtime Error):
a, op, b = map(str, input().split(' '))
if op == '+':
    print(int(a) + int(b))
else:
    print(ans = int(a) - int(b))

Fixed submission:
a, op, b = map(str, input().split(' '))
if op == '+':
    print(int(a) + int(b))
else:
    print(int(a) - int(b))
Buggy python submission (verdict: Time Limit Exceeded):
a, b, x = map(int, input().split(' '))
ans = 0
for i in range(a, b+1):
    if i % x == 0:
        ans += 1
print(ans)

Fixed submission:
a, b, x = map(int, input().split(' '))
print(b//x-(a-1)//x)
Buggy python submission (verdict: Runtime Error):
ans = []
for i in input():
    if (i == '1' or i == '0'): ans.append(i) 
    if i == 'B': ans.pop() 
print(''.join(ans))

Fixed submission:
ans = []
for i in input():
    if (i == '1' or i == '0'): ans.append(i) 
    if i == 'B' and len(ans) != 0: ans.pop() 
print(''.join(ans))
Buggy python submission (verdict: Runtime Error):
n, l = map(int, input().split(' '))
hoges = []
for _ in range(n):
    hoges.append(input())
a = hoges.sort()
print(''.join(a))

Fixed submission:
n, l = map(int, input().split(' '))
a = list(input() for _ in range(n))
print(''.join(sorted(a)))
Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce
n = int(input())
a = list(map(int, input().split()))

ans = reduce(lambda x, y: x*y, a)

if ans > 10**18:
    print(-1)
    exit()

print(ans)


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


ans = 1
if 0 in a:
    print(0)
    exit()

for i in a:
    ans *= i
    if ans > 10**18:
        print(-1)
        exit()

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n = int(input())
a = list(map(int, input().split()))


# ans = np.prod(a)
# if ans > 10**18:
#     print(-1)
#     exit()

# print(ans)

ans = 1
for i in a:
    ans = ans*i

if ans > 10 ** 18:
    print(-1)
    exit()


print(ans)


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


ans = 1
if 0 in a:
    print(0)
    exit()

for i in a:
    ans *= i
    if ans > 10**18:
        print(-1)
        exit()

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = input()
cnt = 0

for i in range(n):
    for j in range(i, n):
        for k in range(j, n):
            if s[i] != s[j] and s[i] != s[k] and s[j] != s[k]:
                if j-i != k-j:
                    cnt +=1

print(cnt)

Fixed submission:
n = int(input())
s = input()
ls = list(s)
all = ls.count('R')* ls.count('G')* ls.count('B')

cnt = 0

for i in range(n):
    for j in range(i+1, n):
        if 2*j - i < n:
            if s[i] != s[j] and s[i] != s[2*j-i] and s[j] != s[2*j -i]:
                cnt +=1

print(all - cnt)
Buggy python submission (verdict: Runtime Error):
L = int(input())

print((L/3)**3

Fixed submission:
L = int(input())

print((L/3)**3)
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())

n = 1
while True:
    if b == 1:
        print(0)
        break
    elif (a-1) * (n-1) + a >= b:
        print(n)
        break
    else:
        n+=1

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

cnt = 0
for i in range(3):
    if s[i] == t[i]:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Runtime Error):
n = int(input())

cnt = 0
for i in range(1,n+1):
    if len(str(i)) % 2 == 1:
        cnt += 1

print(cnt

Fixed submission:
n = int(input())

cnt = 0
for i in range(1,n+1):
    if len(str(i)) % 2 == 1:
        cnt += 1

print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())

def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

if is_prime(n):
    print(len(str(n)))
    exit()

rtn = math.floor(math.sqrt(n))

for i in range(rtn,n+1):
    if n % i == 0:
        print(len(str(i)))
        exit()

Fixed submission:
import math
n = int(input())

# def is_prime(n):
#     if n == 1:
#         return False
#     for i in range(2,int(n**0.5)+1):
#         if n % i == 0:
#             return False
#     return True

# if is_prime(n):
#     print(len(str(n)))
#     exit()

# rtn = math.floor(math.sqrt(n))

# for i in range(rtn,n+1):
#     if n % i == 0:
#         print(len(str(i)))
#         exit()

# n = a * b = b * aでなのでa<=bのaの方を求めてその時のbの桁数出力すれば間に合う。
# 上記のようにbの方から求めるとぎり間に合わない。

rtn = math.ceil(math.sqrt(n))
for i in reversed(range(1, rtn + 1)):
    if n % i == 0:
        b = n // i #求めるのはa(=i)ではなくbの方
        print(len(str(b)))
        exit()

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())

def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

if is_prime(n):
    print(len(str(n)))
    exit()

rtn = math.floor(math.sqrt(n))

for i in range(rtn,n+1):
    if n % i == 0:
        print(len(str(i)))
        exit()

Fixed submission:
import math
n = int(input())

# def is_prime(n):
#     if n == 1:
#         return False
#     for i in range(2,int(n**0.5)+1):
#         if n % i == 0:
#             return False
#     return True

# if is_prime(n):
#     print(len(str(n)))
#     exit()

# rtn = math.floor(math.sqrt(n))

# for i in range(rtn,n+1):
#     if n % i == 0:
#         print(len(str(i)))
#         exit()

# n = a * b = b * aでなのでa<=bのaの方を求めてその時のbの桁数出力すれば間に合う。
# 上記のようにbの方から求めるとぎり間に合わない。

rtn = math.ceil(math.sqrt(n))
for i in reversed(range(1, rtn + 1)):
    if n % i == 0:
        b = n // i #求めるのはa(=i)ではなくbの方
        print(len(str(b)))
        exit()

Buggy python submission (verdict: Time Limit Exceeded):
import math
n = int(input())

rtn = math.floor(math.sqrt(n))

for i in range(rtn,n+1):
    if n % i == 0:
        print(len(str(i)))
        exit()

Fixed submission:
import math
n = int(input())

# def is_prime(n):
#     if n == 1:
#         return False
#     for i in range(2,int(n**0.5)+1):
#         if n % i == 0:
#             return False
#     return True

# if is_prime(n):
#     print(len(str(n)))
#     exit()

# rtn = math.floor(math.sqrt(n))

# for i in range(rtn,n+1):
#     if n % i == 0:
#         print(len(str(i)))
#         exit()

# n = a * b = b * aでなのでa<=bのaの方を求めてその時のbの桁数出力すれば間に合う。
# 上記のようにbの方から求めるとぎり間に合わない。

rtn = math.ceil(math.sqrt(n))
for i in reversed(range(1, rtn + 1)):
    if n % i == 0:
        b = n // i #求めるのはa(=i)ではなくbの方
        print(len(str(b)))
        exit()