Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02924 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def main():
    N = int(input())
    print(N*(N-1)//2)
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
    # -*- coding: utf-8 -*-
def main():
    N = int(input())
    H = list(map(int,input().split()))
    cnt = 0
    flg = 0
    for i in range(N):
        if cnt >= N-i:
            print(cnt)
            return
        if flg!=0:
            if i==flg:
                flg=0
            else:
                continue
        tmp=0
        for j in range(i,N-1):
            if H[j]>=H[j+1]:
                tmp+=1
            else:
                flg=j+1
                # if cnt >= N-j+1:
                #     print(cnt)
                #     return
                break
        if cnt < tmp:
            cnt=tmp
    print(cnt)


if __name__ == '__main__':
    main()
Problem p02945 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def main():
    A,B = map(int,input().split())
    ans = []
    ans.append(A+B)
    ans.append(A-B)
    ans.append(A*B)
    print(max(ans))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def main():
    A,B = map(int(input().split()))
    ans = []
    ans.append(A+B)
    ans.append(A-B)
    ans.append(A*B)
    print(max(ans))

if __name__ == '__main__':
    main()
Problem p02953 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def main():
    N = int(input())
    H = list(map(int,input().split()))
    H.reverse()
    for i in range(N):
        if i != N-1:
            if H[i]>=H[i+1]:
                continue
            if (H[i+1]-H[i])==1:
                H[i+1]=H[i+1]-1
            else:
                print('No')
                return
    if H[N-1]<=H[N-2] or (H[N-1]-H[N-2]==1):
        print('Yes')
        return
    else:
        print('No')
        return

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def main():
    N = int(input())
    H = list(map(int,input().split()))
    H.reverse()
    for i in range(N):
        if H[i]==H[i+1]:
            continue
        if (H[i+1]-H[i])==1:
            H[i+1]=H[i+1]-1
        else:
            print('No')
    print('Yes')

if __name__ == '__main__':
    main()
Problem p02993 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def main():
    S = list(str(input()))
    #print(S)
    for i in range(len(S)):
        if i == 0:
            t = int(S[0])
            continue
        else:
            t = int(S[i-1])
            #print(t)
            if t == int(S[i]):
                print('Bad')
                return
    print('Good')


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import fractions
def lcm(x, y):
    return (x*y) // fractions.gcd(x, y)
def main():
    A,B,C,D = map(int,input().split())
    E = lcm(C,D)
    Cc = B // C
    Dd = B // D
    Ee = B // E
    flo = A-1
    Cf = flo // C
    Df = flo // D
    Ef = flo // E
    All = B-(Cc+Dd-Ee)
    Sub = flo-(Cf+Df-Ef)
    print(int(All - Sub))
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
def main():
    A,B,C,D = map(int,input().split())
    E = (C*D)//math.gcd(C,D)
    Cc = B / C
    Dd = B / D
    Ee = B / E
    flo = A-1
    Cf = flo / C
    Df = flo / D
    Ef = flo / E
    All = B-(math.floor(Cc)+math.floor(Dd)-math.floor(Ee))
    Sub = flo-(math.floor(Cf)+math.floor(Df)-math.floor(Ef))
    print(All - Sub)
if __name__ == '__main__':
    main()
Problem p02995 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import fractions
def lcm(x, y):
    return (x*y) // fractions.gcd(x, y)
def main():
    A,B,C,D = map(int,input().split())
    E = lcm(C,D)
    Cc = B // C
    Dd = B // D
    Ee = B // E
    flo = A-1
    Cf = flo // C
    Df = flo // D
    Ef = flo // E
    All = B-(Cc+Dd-Ee)
    Sub = flo-(Cf+Df-Ef)
    print(int(All - Sub))
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
def main():
    A,B,C,D = map(int,input().split())
    E = (C * D) // math.gcd(C,D)
    Cc = B / C
    Dd = B / D
    Ee = B / E
    flo = A-1
    Cf = flo / C
    Df = flo / D
    Ef = flo / E
    All = B-(math.floor(Cc)+math.floor(Dd)-math.floor(Ee))
    Sub = flo-(math.floor(Cf)+math.floor(Df)-math.floor(Ef))
    print(All - Sub)
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
def main():
    A,B,C,D = map(int,input().split())
    E = math.lcm(C*D)
    Cc = B / C
    Dd = B / D
    Ee = B / E
    flo = A-1
    Cf = flo / C
    Df = flo / D
    Ef = flo / E
    All = B-(math.floor(Cc)+math.floor(Dd)-math.floor(Ee))
    Sub = flo-(math.floor(Cf)+math.floor(Df)-math.floor(Ef))
    print(All - Sub)
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
def main():
    A,B,C,D = map(int,input().split())
    E = math.gcd(C*D)
    Cc = B / C
    Dd = B / D
    Ee = B / E
    flo = A-1
    Cf = flo / C
    Df = flo / D
    Ef = flo / E
    All = B-(math.floor(Cc)+math.floor(Dd)-math.floor(Ee))
    Sub = flo-(math.floor(Cf)+math.floor(Df)-math.floor(Ef))
    print(All - Sub)
if __name__ == '__main__':
    main()
Problem p02982 (python)

Fixed submission:
n,d =map(int, input().split())
L=[]
for i in range(n):
    L.append(list(map(int, input().split())))
ans =0

for i in range(n):
    for j in range(i+1,n):
        dis=0
        for k in range(d):
            dis += (L[i][k]-L[j][k])**2
        dis = dis**0.5
        if dis % 1.0 ==0:
            ans +=1
print(ans)

Buggy submission (verdict: Runtime Error):
n,d =map(int, input().split())
L=[]
for i in range(n):
    L.append(list(map(int, input().split())))
ans =0

for i in range(n):
    for j in range(i+1,n):
        dis=0
        for k in range(d):
            dis = (L[i][k]-L[j][k])**2
        dis = dis**0.5
        if(dis == int(dis):
            ans +=1
print(ans)
Problem p03000 (python)

Fixed submission:
goukei=0 
count=1

N,X =map(int, input().split())
L= list(map(int, input().split()))
    

for i in range(N):
    goukei +=L[i]
    
    if(goukei>X):
        break
    else:
        count +=1
        
print(count)

Buggy submission (verdict: Runtime Error):
oukei=0 
count=1

N,X =map(int, input().split())
L= list(map(int, input().split()))
    

for i in range(N):
    goukei +=L[i]
    
    if(goukei>X):
        break
    else:
        count +=1
        
print(count)

Buggy submission (verdict: Runtime Error):
oukei=0 
count=1

N,X =map(int, input().split())
L= list(map(int, input().split()))
    

for i in range(N-1):
    goukei +=L[i]
    
    if(goukei>X):
        break
    else:
        count +=1
        
print(count)
Problem p03658 (python)

Fixed submission:
n,k =map(int, input().split())
l =list(map(int, input().split()))
ans =0

l.sort(reverse=True)
for i in range(k):
    ans += l[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = 0

a.sort(reverse=True)
a_sum = sum(a[0:len(a):2])
b_sum = sum(a[1:len(a):2])

ans = a_sum-b_sum

print(ans)
Problem p04030 (python)

Fixed submission:
s = list(input())
ans_list=[]
for i in range(len(s)):
    if(s[i] == "0"):
        ans_list.append("0")
    elif(s[i] == "1"):
        ans_list.append("1")
    elif(s[i] == "B"):
        if(len(ans_list) != 0):
            ans_list.pop()
        else:
            continue
for i in range(len(ans_list)):
    print(ans_list[i],end='')

Buggy submission (verdict: Runtime Error):
s = list(input())
ans_list=[]
for i in range(len(s)):
    if(s[i] == "0"):
        ans_list.append("0")
    elif(s[i] == "1"):
        ans_list.append("1")
    elif(s[i] == "B"):
        if(ans_list != 0):
            ans_list.pop()
        else:
            continue
for i in range(len(ans_list)):
    print(ans_list[i],end='')
Problem p02718 (python)

Fixed submission:
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = sum(A)
flag = 0
A = sorted(A, reverse=True)
# print(sum, A)

for i in range(0, M):
  if M == 0:
    break
  if A[i]<(sum/(4*M)):
    print('No')
    flag = 1
    break

if flag == 0:
  print("Yes")

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = sum(A)
flag = 0
A = sorted(A, reverse=True)
# print(sum, A)

for i in range(0, M+1):
  if M == 0:
    break
  if A[i]<(sum/(4*M)):
    print('No')
    flag = 1
    break

if flag == 0:
  print("Yes")

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
sum = sum(A)
flag = 0
A = sorted(A, reverse=True)
# print(sum, A)

for i in range(0, M+1):
  if A[i]<(sum/(4*M)):
    print('No')
    flag = 1
    break

if flag == 0:
  print("Yes")
Problem p02705 (python)

Fixed submission:
import math

r = input()

print(2*int(r)*math.pi)

Buggy submission (verdict: Runtime Error):
r = input()
print(2*int(r)*math.pi)
Problem p04043 (python)

Fixed submission:
X = input()
X = str(X)
if X == "5 5 7" or X == "5 7 5" or X == "7 5 5":
    print("YES")
else: print("NO")

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
C = input()
X = A + B + C
if X == "557" or X == "575" or X == "755":
    print("YES")
else: print("NO")
Problem p02953 (python)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
 
for i in range(N-1, 0, -1):
    if H[i-1] - H[i] == 1:
        H[i-1] -= 1
    elif H[i-1] - H[i] > 1:
        flag = False
        print('No')
        break
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))
for i in range(N-1, 0, -1):
    if h[i-1] - h[i] ==1:
        h[i-1]-= 1
    elif h[i-1] -h[i ]> 1:
        flag = False
        print("No")
        break
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
n = int(input())
h = list(map(int, input().split()))
for i in range(N-1, 0, -1):
    if h[i-1] - h[i] ==1:
        h[i-1]-= 1
    elif h[i-1] -h[i ]> 1:
        flag = False
        print("No")
        break
else:
    print("Yes")
Problem p03281 (python)

Fixed submission:
n = int(input())
count = 0
for i in range(1, n+1):
    if i%3 ==0 and i%5 == 0 and i%7 ==0:
        count+=1
    
    elif i%27==0 and i%5==0:
        count+=1
    
    elif i%27==0 and i%7 ==0:
        count+=1
    elif i%3==0 and i%5==0 and i%13==0:
        count+=1
    elif i%3 ==0 and i%5==0 and i%11 ==0:
        count+=1

print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(1, n+1):
    if i%2 !=0:
        for j in range(1, i+1):
            if i%j==0:
                count+=1
            if count ==8:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(1, n+1):
    if i%2 !=0:
        for j in range(1, i+1):
            if i%j==0:
                count+=1
            if count ==8:
                ans += 1
print(ans)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
 
if a * b % 2 == 0:
  print('Even')
else:
  print('Odd')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if (a*b)%2==0: 
    print("even")
else:
    print("odd")
Problem p02924 (python)

Fixed submission:
N=int(input())-1
if N%2==0:
	print(int(N/2)*(N+1))
else:
  	print((N)*int((N+1)/2))

Buggy submission (verdict: Runtime Error):
import numpy as np
N=int(input())
list_N=np.array(list(range(1,N)))
print(int(np.sum(list_N)))

Buggy submission (verdict: Runtime Error):
import numpy as np
N=int(input())
list_N=list(range(1,N+1))
P=[list_N[-1]]
P.extend(list_N[:-1])

ret=np.sum(np.array(P)%np.array(list_N))
print(ret)
Problem p03035 (python)

Fixed submission:
import sys
A,B= (int(i) for i in input().split(" "))  

if A<=5:
    print(0)
elif A<=12:
    print(int(B/2))
else:
    print(B)

Buggy submission (verdict: Runtime Error):
if A<=5:
    print(0)
elif A<=12:
    print(int(B/2))
else:
    print(B)

Buggy submission (verdict: Runtime Error):
import sys
A,B= (int(i) for i in input().split(" "))  

if A=<5:
    print(0)
elif A=<12:
    print(int(B/2))
else:
    print(B)
Problem p03047 (python)

Fixed submission:
N,K=(int(i) for i in input().split())
print(N-K+1)

Buggy submission (verdict: Runtime Error):
import re
N=int(input())
listA=[input() for i in range(N)]

firstB=0
endA=0
feAB=0
AB=0
for i in listA:
    AB+=len(re.findall("AB",i))
    print(len(re.findall("AB",i)))
    if i[0]=="B":
        firstB+=1
    if i[-1]=="A":
        endA+=1
        if i[0]=="B":
            feAB+=1
AB+=min([endA,firstB])
print(AB)
Problem p02741 (python)

Fixed submission:
def main():
    sequence =list(map(int, "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51".split(', ')))
    kth = int(input())
    print(sequence[kth - 1])
       

main()

Buggy submission (verdict: Runtime Error):
def main():
    sequence =list(map(int, "1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51".split(', ')))
    kth = int(input())
    print(sequence(kth - 1))
       

main()
Problem p02696 (python)

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

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
count = 0
if n % 2 == 0:
    for i in range(int(n/2)):
        print(i+1, n-i-1)
        count += 1
        if count == m:
            break;
else:
    for i in range(int((n-1)/2)):
        print(i+1, n-i-2)
        count += 1
        if count == m:
            break;
Problem p02700 (python)

Fixed submission:
import math
a, b, c, d = map(int, input().split())
print("No") if math.ceil(a/d) < math.ceil(c/b) else print("Yes")

Buggy submission (verdict: Runtime Error):
a, b, c, d = input().split()
print("No") if (a // d + 1) < (c // b + 1) else print("Yes")
Problem p02882 (python)

Fixed submission:
import numpy as np

a, b, x = map(int, input().split())
if(x >= 0.5*a*a*b):
  t_theta = (2*b)/a - (2*x)/a**3
  print ((180 * np.arctan(t_theta)) / np.pi)
else:
  t_theta = (a*b*b) / (2*x)
  print ((180 * np.arctan(t_theta)) / np.pi)

Buggy submission (verdict: Runtime Error):
import math

a, b, x = map(int, input().split())
if(x >= 0.5*a*a*b):
  t_theta = (2*b)/a - (2*x)/a**3
  print (180 * math.atan(t_theta)) / math.pi
else:
  t_theta = (a*b*b) / (2*a)
  print (180 * math.atan(t_theta)) / math.pi
Problem p02885 (python)

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

if (a <= b * 2):
  print (0)
else:
  print (a - b * 2)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(float, input().split()))

for i in a:
	sum += i 
	double = i ** 2
print((sum**2-double)/2)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(double, input().split()))

for i in a:
	sum += i 
	double = i ** 2
print((sum**2-double)/2)

Buggy submission (verdict: Runtime Error):
n = input()
a = list(map(int, input().split()))

for i in a:
	sum += a[i] 
	double = a[i] ** 2
print((sum**2-double)/2)

Buggy submission (verdict: Runtime Error):
a , b = map(int, input().split())

if (a <= b * 2):
  print 0:
else:
  print a - b * 2:

Buggy submission (verdict: Runtime Error):
a , b = map(int, input().split())

if (a <= b * 2):
  print 0
else:
  print a - b * 2
Problem p03060 (python)

Fixed submission:
num = int(input())
value = [int(s) for s in input().split()]
cost = list(map(int, input().split()))

sum = 0
for i in range(num):
  if (value[i] - cost[i] > 0):
    sum += value[i] - cost[i]
print(sum)

Buggy submission (verdict: Runtime Error):
num = int(input())
value = [int(s) for s in input().split()]
cost = list(map(int, input().split()))

sum = 0
for i in range(num):
	if (value[i] - cost[i] > 0):
      sum += value[i] - cost[i]
print(sum)
Problem p02715 (python)

Fixed submission:
mod = 10 ** 9 + 7

n, k = map(int, input().split())
otv = 0
D = [0] * (k + 1)
for i in range(1, k + 1):
    D[i] = pow(k // i, n, mod)

for i in range(k // 2, 0, -1):
    for j in range(i * 2, k + 1, i):
        D[i] -= D[j]

for i in range(1, k + 1):
    otv = (otv + D[i] * i) % mod

print(otv)

Buggy submission (verdict: Runtime Error):
mod = 10 ** 9 + 7

n, k = map(int, input().split())
otv = 0
D = [0] * (n + 1)
for i in range(1, n + 1):
    D[i] = pow(k // i, n, mod)

for i in range(k // 2, 0, -1):
    for j in range(i * 2, k + 1, i):
        D[i] -= D[j]

for i in range(1, n + 1):
    otv = (otv + D[i] * i) % mod

print(otv)
Problem p02717 (python)

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

ab = a
a = b
b = ab

ab = c
c = a
a = ab

print(a, b, c)

Buggy submission (verdict: Runtime Error):
n = int(input())
D = []

def FindOtvet(i, j, otv):
    if i == 0:
        return ''
    if j == 0:
        if (otv + D[i - 1][j]) < n:
            otv += D[i - 1][j]
            return str(j + 1) + FindOtvet(i - 1, j + 1, otv)
        else:
            return str(j) + FindOtvet(i - 1, j, otv)
    elif j == 9:
        if (otv + D[i - 1][j - 1]) < n:
            otv += D[i - 1][j - 1]
            return str(j) + FindOtvet(i - 1, j, otv)
        else:
            return str(j - 1) + FindOtvet(i - 1, j - 1, otv)
    else:
        if (otv + D[i - 1][j - 1]) < n:
            otv += D[i - 1][j - 1]
            if (otv + D[i - 1][j]) < n:
                otv += D[i - 1][j]
                return str(j + 1) + FindOtvet(i - 1, j + 1, otv)
            else:
                return str(j) + FindOtvet(i - 1, j, otv)
        else:
            return str(j - 1) + FindOtvet(i - 1, j - 1, otv)

arr = []
for i in range(10):
    arr.append(1)
D.append(arr)
totalSum = 9
i = 1
respI = 0
respJ = 0
while respI == 0 and respJ == 0:
    arr = []
    for j in range(10):
        if j == 0:
            arr.append(D[i - 1][j] + D[i - 1][j + 1])
        elif j < 9:
            arr.append(D[i - 1][j - 1] + D[i - 1][j] + D[i - 1][j + 1])
        else:
            arr.append(D[i - 1][j - 1] + D[i - 1][j])
        if j > 0:
            if (totalSum + arr[j]) >= n:
                respI = i
                respJ = j
                break
            totalSum += arr[j]
    D.append(arr)
    i += 1
respStr = str(respJ)
print(respStr + FindOtvet(respI, respJ, totalSum))
Problem p02719 (python)

Fixed submission:
import math

#n,k
n,k = (int(x) for x in input().split())

b = n % k

#print(b)

c = abs(k-b)

if b < c:
    ans = b
else:
    ans = c

print(ans)

Buggy submission (verdict: Runtime Error):
import math

#n,k
n,k = (int(x) for x in input().split())

b = n % k

print(b)

#c = abs(k-b)

if b < c:
    ans = b
else:
    ans = c

print(ans)
Problem p02697 (python)

Fixed submission:
n,m=map(int,input().split())
for i in range(0,m):
  if n-2*i-1>n/2 or n%2==1 :
    print(i+1,n-i)
  else:
    print(i+1,n-i-1)

Buggy submission (verdict: Runtime Error):
n = int(input())
A = list(map(int, input().split()))
pn = 0
 
for s in range(1, n+1):
    for t in range(s+A[s-1]+1, n+1):
        if A[s-1] + A[t-1] == t-s:
            pn += 1
 
print(pn)
Problem p02743 (python)

Fixed submission:
from decimal import *
 
a, b, c = map(Decimal, input().split())
if a.sqrt() + b.sqrt() < c.sqrt():
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
from decimal import *
 
a, b, c = map(Decimal, input().split())
if sqrt(a) + sqrt(b) < sqrt(c):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from decimal import *
 
a, b, c = map(Decimal, input().split())
if sqrt(a) + sqrt(b) < sqrt(c):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from * import decimal
from math import sqrt
 
a, b, c = map(decimal, input().split())
if sqrt(a) + sqrt(b) < sqrt(c):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import decimal
from math import sqrt
 
a, b, c = map(decimal, input().split())
if sqrt(a) + sqrt(b) < sqrt(c):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from math import sqrt
 
a, b, c = map(Decimal, input().split())
if sqrt(a) + sqrt(b) < sqrt(c):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from math import sqrt
 
a, b, c = map(decimal, input().split())
if sqrt(a) + sqrt(b) < sqrt(c):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from math import sqrt
 
a, b, c = map(desimal, input().split())
if sqrt(a) + sqrt(b) < sqrt(c):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from sympy import sqrt

a, b, c = map(int, input().split())
if sqrt(a) + sqrt(b) < sqrt(c):
    print('Yes')
else:
    print('No')
Problem p02747 (python)

Fixed submission:
#!/usr/bin/env python3

input = input()
hitati = [ 'hi'*i for i in range(1, 6) ]
if input in hitati:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3

input = input()
hitati = [ hi*i for i in range(1, 6) ]
if input in hitati:
    print('Yes')
else:
    print('No')
Problem p03087 (python)

Fixed submission:
n,q = map(int, input().split())
s =input()
A = [[int(j) for j in input().split()] for i in range(q)]
ls = [0] * (n+1)
for i in range(n-1):
    if s[i] == 'A' and s[i+1] == 'C':
        ls[i+1]= ls[i]+1
    else:
        ls[i+1]= ls[i]

for k in range(q):
    print(ls[A[k][1]-1]-ls[A[k][0]-1])

Buggy submission (verdict: Runtime Error):
n,q = map(int, input().split())
s =input()
A = [[int(j) for j in input().split()] for i in range(q)]
ls = [0] * (n+1)
for i in range(n-1):
    if s[i] == 'A' and s[i+1] == 'C':
        ls[i+1]= ls[i]+1
    else:
        ls[i+1]= ls[i]

for k in range(q):
    print(ls[[k][0]-1-A[k][1]-1])
Problem p02705 (python)

Fixed submission:
R=int(input())
i=R*6.283184
print(i)

Buggy submission (verdict: Runtime Error):
R=input()
i=R*3.141592*2
print(i)

Buggy submission (verdict: Runtime Error):
i=R*6.28318530717958623200
print(i)

Buggy submission (verdict: Runtime Error):
print(R*6.283185)

Buggy submission (verdict: Runtime Error):
i=2*R
s=i*3.1415
print(s)

Buggy submission (verdict: Runtime Error):
print(R*3.141592*2)

Buggy submission (verdict: Runtime Error):
i=R*3.141592*2
print(i)

Buggy submission (verdict: Runtime Error):
i=3.141592*2*R
return i

Buggy submission (verdict: Runtime Error):
i=R*3.1415*2
print(i)

Buggy submission (verdict: Runtime Error):
i=R*3.1415*2
return i

Buggy submission (verdict: Runtime Error):
i=R*3.1415
return i
Problem p02706 (python)

Fixed submission:
m,n=map(int,input().split())
a=list(map(int,input().split()))
while n>0:
  m= m-a[n-1]
  n=n-1
if m>=0:
  print(m)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
m,n=map(int,input().split())
a=input().split()
while n>0:
  m= m-a[n-1]
  n=n-1
if m>=0:
  print(m)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
m,n=input().split()
while n>0:
  m=m-int(input())
  n=n-1
if m>=0:
  print(m)
else:
  print(-1)

Buggy submission (verdict: Runtime Error):
m,n=input().split()
while n>0:
  m=m-int(input())
  n=n-1
print(n)
Problem p02717 (python)

Fixed submission:
X,Y,Z=input().split()
print(Z,X,Y)

Buggy submission (verdict: Runtime Error):
print(int(input()) int(input()) int(input()))

Buggy submission (verdict: Runtime Error):
print(int(input(Z)) int(input(X)) int(input(Y)))

Buggy submission (verdict: Runtime Error):
a=Y
b=X
c=Z
A=c
B=b
C=a
print(A" "B" "C)

Buggy submission (verdict: Runtime Error):
a=Y
b=X
c=Z
A=c
B=b
C=a
print(A B C)