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

Fixed submission:
X = int(input())
if X == 7 or X == 5 or X == 3:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
X = int(input(N))
if X == 7 or X == 5 or X == 3:
  print('YES')
else:
  print('NO')
Problem p03597 (python)

Fixed submission:
N = int(input())
A = int(input())
print(N**2-A)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
print(N*M-A)
Problem p02664 (python)

Fixed submission:
t=list(input())
n=len(t)
for i in range(n):
    if t[i]=="?":
        t[i]="D"
print("".join(t))

Buggy submission (verdict: Runtime Error):
t=list(input())
n=len(t)
if t[0]=="?":
    if t[1]=="P":
            t[0]="D"
    if t[1]=="D":
            t[0]="D"
    elif t[1]=="?":
        t[0]="D"
for i in range(1,n):
    if t[i]=="?":
        if t[i-1]=="P":
            t[i]="D"
        if t[i-1]=="D":
            t[i]="D"
print("".join(t))

Buggy submission (verdict: Runtime Error):
t=list(input())
n=len(t)
if t[0]=="?":
    if t[1]=="P":
            t[0]="D"
    if t[1]=="D":
            t[0]="P"
    elif t[1]=="?":
        t[0]="P"
for i in range(1,n):
    if t[i]=="?":
        if t[i-1]=="P":
            t[i]="D"
        if t[i-1]=="D":
            t[i]="P"
print("".join(t))

Buggy submission (verdict: Runtime Error):
t=list(input())
n=len(t)
if t[0]=="?":
    if t[1]=="P":
            t[i]="D"
    if t[1]=="D":
            t[i]="P"
for i in range(1,n):
    if t[i]=="?":
        if t[i-1]=="P":
            t[i]="D"
        if t[i-1]=="D":
            t[i]="P"
print("".join(t))
Problem p02713 (python)

Fixed submission:
import math
k=int(input())
ans=0
for p in range(1,k+1):
    for q in range(1,k+1):
        gcd=math.gcd(p,q)
        for r in range(1,k+1):
            ans=ans+math.gcd(gcd,r)
print(ans)

Buggy submission (verdict: Runtime Error):
k=input()
sumk=0
for i in range (1,k+1):
    for a in range(1,k+1):
        for b in range(1,k+1):
            for c in range(1,k+1):
                gcd=1
                m=min(a,b,c)
                for x in range(1,m+1):
                    if (a%x==0 and b%x==0 and c%x==0):
                        gcd=x
                    else:
                        gcd=gcd
                        sumk=sumk+gcd
print(sumk)
Problem p02717 (python)

Fixed submission:
x,y,z=map(int,input().split())
print(z,x,y)

Buggy submission (verdict: Runtime Error):
x,y,z=map(int, input().split)
 print(z, x, y)

Buggy submission (verdict: Runtime Error):
 x,y,z=map(int, input().split)
 print(z,x,y)
Problem p02718 (python)

Fixed submission:
n,m=map(int,input().split())
a=list(map(int,input().split()))
sumA=sum(a)
cnt=0
for i in a:
    if i>=sumA/(4*m):
        cnt=cnt+1
    else:
        cnt=cnt
if cnt>=m:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=list(map(int,input().split()))
sumA=sum(a)
cnt=0
for i in a:
    if i>=sum/(4*m):
        cnt=cnt+1
    else:
        cnt=cnt
if cnt>=m:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
a=list(map(int,input().split()))
sumA=sum(a)
cnt=0
for i in a:
    if i>=sum/(4*m):
        cnt=cnt+1
if cnt>=m:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())
sum=0
for i in range(n):
    a=input()
    sum=sum+a
num=0
for i in range(n):
    a=input()
    if a<1/(4*sum):
        num=num
    else:
        num=num+1
if num>=m:
    print('Yes')
else:
    print('No')
Problem p02724 (python)

Fixed submission:
x=int(input())
a=x//500
b=(x%500)//5
print(1000*a+5*b)

Buggy submission (verdict: Runtime Error):
x=input()
a=x//500
b=(x%500)//5
print(1000*a+5*b)

Buggy submission (verdict: Runtime Error):
x=input()
a=x//500
b=a//5
print(1000*a+5*b)
Problem p02730 (python)

Fixed submission:
s=input()
n=len(s)
for i in range(n):
    if not s[i]==s[n-1-i]:
        print('No')
        quit()
for i in range((n-1)//2):
    if not s[i]==s[(n-1)//2-1-i]:
        print('No')
        quit()
for i in range((n-1)//2):
    if not s[(n+3)//2-1+i]==s[n-1-i]:
        print('No')
        quit()
print('Yes')

Buggy submission (verdict: Runtime Error):
s=input()
n=len(s)
for i in range(n):
    if not s[i]==s[n-1-i]:
        print('No')
        quit()
for i in range(int(n*(n-1)/2)):
    if not s[i]==s[int((n*(n-1))/2)-1-i]:
        print('No')
        quit()
for i in range(int(n*(n-1)/2)):
    if not s[int(n*(n+3)/2)-1+i]==s[n-1-i]:
        print('No')
        quit()
else:
    print('Yes')
Problem p02731 (python)

Fixed submission:
L=int(input())
x=L/3
y=L/3
z=L/3
print(x*y*z)

Buggy submission (verdict: Runtime Error):
L=input()
x=L/6
y=L/6
z=L/6
print(x*y*z)
Problem p02755 (python)

Fixed submission:
(A,B)=map(int, input().split())
 
for x in range(10000):
    if (int(x*0.08)==A and int(x*0.1)==B):
        print(x)
        break
else:
    print("-1")

Buggy submission (verdict: Runtime Error):
(A,B)=map(int, input().split())
 
for x in range(10000):
    if (int(x*0.08)==A) and (int(x*0.1)==B):
        print"x"
        break
    else:
        print"-1"

Buggy submission (verdict: Runtime Error):
(A,B)=map(int, input().split())

for x in range(10000):
    if (int(x*0.08)==A and int(x*0.1)==B):
        print"x"
        break
    else:
        print"-1"

Buggy submission (verdict: Runtime Error):
(A,B)=map(int, input().split())

for x in range(10000):
    if (int(x*0.08)==a and int(x*0.1)==b):
        print"x"
    else:
        print"-1"
Problem p02767 (python)

Fixed submission:
n=int(input())
x=list(map(int, input().split()))
maxn=0
for i in range(n):
    if x[i]>maxn:
        maxn=x[i]
    else:
        maxn=maxn
minp=0
for j in range(n):
    minp=minp+(x[j]-1)**2
for i in range(maxn+1):
    power=0
    for j in range(n):
        power=power+(x[j]-i)**2
    if power<minp:
        minp=power
    else:
        minp=minp
print(minp)

Buggy submission (verdict: Runtime Error):
n=input()
x=list(map(int, input().split()))
maxn=0
for i in range(n):
    if x[i]>maxn:
        maxn=x[i]
    else:
        maxn=maxn
minp=0
for j in range(n):
    minp=minp+(x[j]-1)**2
for i in range(maxn+1)
    for j in range(n):
        power=power+(x[j]-i)**2
    if power<minp:
        minp=power
    else:
        minp=minp
print(minp)
Problem p02791 (python)

Fixed submission:
n=int(input())
p=list(map(int,input().split()))
ans=1
m=p[0]
for i in range(1,len(p)):
    if p[i]==1:
        ans=ans+1
        break
    elif p[i]>m:
        continue
    else:
        ans=ans+1
        m=p[i]
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
p=list(map(int,input().split()))
ans=1
m=s[0]
for i in range(1,n):
    if s[i]==1:
        ans=ans+1
    elif p[i]>m:
        continue
    else
        ans=ans+1
        m=s[i]
print(ans)
Problem p02812 (python)

Fixed submission:
n=int(input())
s=input()
count=0
for i in range(n-2):
    if s[i]=="A":
        if s[i+1]=="B":
            if s[i+2]=="C":
                count=count+1
                i=i+3
            else:
                i=i+2
        else:
            i=i+1
print(count)

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
count=0
for i in range(n):
    if s[i]=="A":
        if s[i+1]=="B":
            if s[i+2]=="C":
                count=count+1
                i=i+3
            else:
                i=i+2
        else:
            i=i+1
print(count)
Problem p02817 (python)

Fixed submission:
s,t=input().split()
print(t+s)

Buggy submission (verdict: Runtime Error):
s,t=map(input().split())
print(t+s)
Problem p02910 (python)

Fixed submission:
s=input()
n=len(s)
ans="Yes"
if n%2==0:
    for i in range(n//2):
        if s[2*i]=="L":
            ans="No"
            break
        if s[2*i+1]=="R":
            ans="No"
            break
else:
    if s[0]=="L":
        ans="No"
    for i in range(1,n//2+1):
        if s[2*i]=="L":
            ans="No"
            break
        if s[2*i-1]=="R":
            ans="No"
            break
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
n=len(s)
ans="Yes"
if n%2==0:
    for i in range(n//2+1):
        if s[2*i]=="L":
            ans="No"
            break
        if s[2*i+1]=="R":
            ans="No"
            break
else:
    if s[0]=="L":
        ans="No"
    for i in range(1,n//2+1):
        if s[2*i]=="L":
            ans="No"
            break
        if s[2*i-1]=="R":
            ans="No"
            break
print(ans)
Problem p02952 (python)

Fixed submission:
n=int(input())
t=n
c=1
while t>=10:
    t=t//10
    c=c+1
ans=0
for i in range(1,c):
    if i%2==1:
        ans+=10**(i)-10**(i-1)
if c%2==1:
    ans=ans+n+1-10**(c-1)
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
ans="Yes"
for i in range(n-1):
    m=min(h[i+1:n])
    if h[i]-m>1:
        ans="No"
        break
print(ans)
Problem p02971 (python)

Fixed submission:
n=int(input())
a=[]
m1=0
m2=0
for i in range(n):
    a.append(int(input()))
    A=a[i]
    if a[i]>m1:
        m2=m1
        m1=a[i]
        index=i
    elif m1==a[i]:
        m2=a[i]
    elif a[i]>m2:
        m2=a[i]
for i in range(n):
    if i==index:
        print(m2)
    else:
        print(m1)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=[]
m1=0
m2=0
for i in range(n):
    a.append(int(input()))
    if a>m1:
        m2=m1
        m1=a
        index=i
    elif m1==a:
        m2=a
    elif a>m2:
        m2=a
for i in range(n):
    if i==index:
        print(m2)
    else:
        print(m1)
Problem p03448 (python)

Fixed submission:
A=[]
for _ in range(3):
    A.append(int(input()))
a=A[0]
b=A[1]
c=A[2]
x=int(input())
count=0
for p in range(a+1):
    for q in range(b+1):
        for r in range(c+1):
            if 500*p+100*q+50*r==x:
                count=count+1
            else:
              count=count
print(count)

Buggy submission (verdict: Runtime Error):
A=[]
for _ in range(3):
    A.append(int(input()))
a=A[0]
b=A[1]
c=A[2]
x=int(input())
count=0
for p in range(a):
    for q in range(b):
        for r in range(c):
            if 500*p+100*q+50*r==x:
                count=count+1
			else:
				count=count
print(count)
Problem p02812 (python)

Fixed submission:
N = int(input())
S = input()
c = 0
for i in range(N-2):
  if S[i] != 'A':
    continue
  else:
    if S[i+1] == 'B' and S[i+2] == 'C' and i <= N-3:
      c += 1
print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
c = 0
for i in range(N):
  if S[i] != 'A':
    continue
  else:
    if S[i+1] == 'B' and S[i+2] == 'C' and i <= N-3:
      c += 1
print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
c = 0
for i in range(N):
  if S[i] != 'A':
    continue
  else:
    if S[i+1] == 'B' and S[i+2] == 'C':
      c += 1
print(c)
Problem p02909 (python)

Fixed submission:
S = input()
if S == 'Sunny':
  N = 'Cloudy'
elif S == 'Cloudy':
  N = 'Rainy'
elif S == 'Rainy':
  N = 'Sunny'
  
print(N)

Buggy submission (verdict: Runtime Error):
S = input()
if S == Sunny:
  N = Cloudy
elif S == Cloudy:
  N = Rainy
elif S == Rainy:
  N = Sunny
  
print(N)
Problem p02945 (python)

Fixed submission:
A,B = map(int,input().split())
a = A+B
b = A-B
c = A*B
List = [a,b,c]
print(max(List))

Buggy submission (verdict: Runtime Error):
A,B = map(int,input(),split())
a = A+B
b = A-B
c = A*B
abc = [a,b,c]
max(abc)
Problem p02981 (python)

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

Buggy submission (verdict: Runtime Error):
N,A,B = map(int,input().split)
a = N*A
print(min(a,B))
Problem p03076 (python)

Fixed submission:
A = []
for i in range(5):
  a = int(input())
  A.append(a)
B = []
for i in range(5):
  b = A[i]%10
  B.append(b)
C =[]
for i in range(5):
  if B[i] != 0:
    c = A[i]+10-B[i]
  else:
    c = A[i]
  C.append(c)
t = 0  
for i in range(5):
  t += C[i]
B.sort()
z = set(B)
if min(z) == 0:
  z.remove(0)
if len(z) ==0:
  print(t)
else:
  print(t-10+min(z))

Buggy submission (verdict: Runtime Error):
A = []
for i in range(5):
  a = int(input())
  A.append(a)
B = []
for i in range(5):
  b = A[i]%10
  B.append(b)
C =[]
for i in range(5):
  if B[i] != 0:
    c = A[i]+10-B[i]
  else:
    c = A[i]
  C.append(c)
t = 0  
for i in range(5):
  t += C[i]
B.sort()
z = set(B)
if min(z) == 0:
  z.remove(0)
print(t-10+min(z))
Problem p03086 (python)

Fixed submission:
S = input()
A =set()
t = 0
for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'G' or S[i] == 'C' or S[i] == 'T':
    t += 1
  else:
    A.add(t)
    t = 0
A.add(t)
print(max(A))

Buggy submission (verdict: Runtime Error):
S = input()
A =set()
t = 0
for i in range(len(S)):
  if S[i] == 'A' or S[i] == 'G' or S[i] == 'C' or S[i] == 'T':
    t += 1
  else:
    A.add(t)
    t = 0
print(max(A))
Problem p03160 (python)

Fixed submission:
N = int(input())
h = list(map(int,input().split()))
dp = [0]*N
dp[0]= 0
dp[1] = abs(h[1]-h[0])
for i in range(1,N-1):
  dp[i+1] = min(dp[i-1] + abs(h[i+1]-h[i-1]),dp[i] + abs(h[i+1]-h[i]))
  
print(dp[-1])

Buggy submission (verdict: Runtime Error):
N,K= map(int,input().split())
h = list(map(int,input().split()))
dp =[0]*N
dp[0] = 0
dp[1] = h[0]
for j in range(1,N):
  dp[j] = dp[j-1] + abs(h[j] - h[j-1])
  for i in range(max(j-K,0),j):
    dp[j]=min(dp[i]+ abs(h[j]-h[i]),dp[j]) 
print(dp[-1])

Buggy submission (verdict: Runtime Error):
N,K= map(int,input().split())
h = list(map(int,input().split()))
dp =[0]*N
dp[0] = 0
dp[1] = h[0]
for j in range(1,N):
  dp[j] = dp[j-1] + abs(h[j] - h[j-1])
  for i in range(max(j-K,0),j):
    dp[j]=min(dp[i]+ abs(h[j]-h[i]),dp[j]) 
print(dp[-1])
Problem p02787 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

import numpy as np

h, n = map(int, input().split())
inf=2*10**9
a = np.full(n,inf, int)
b = np.full(n,inf, int)
for i in range(0, n):
  a[i], b[i] = map(int, input().split())

dp=np.full(10001,0,int)
dp[0]=0

for i in range(1,h+1):
  dp[i]=(dp[i-a]+b).min()

print(dp[h])

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

import numpy as np

h, n = map(int, input().split())

ab=[[0]*2 for i in range(n)]
maxa=0

for i in range(0,n):
  ab[i][0], ab[i][1] = map(int, input().split())
  if maxa<ab[i][0]:
    maxa=ab[i][0]

sab=sorted(ab,key=lambda x:x[0]*10**5-x[1])

ans=[0]*(h+maxa)
maxl=2*10**8

for i in range(1,h+maxa):
  ans[i]=maxl
  for j in range(0,n):
    if i<sab[j][0]:
      break
    if ans[i] > (ans[i-sab[j][0]]+sab[j][1]):
      ans[i] = ans[i-sab[j][0]]+sab[j][1]

print(min(ans[h:h+maxa-1]))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
#a = int(input())
# スペース区切りの整数の入力
#b, c = map(int, input().split())
# 文字列の入力
#s = input()
# 出力
#print("{} {}".format(a+b+c, s))

import numpy as np

h, n = map(int, input().split())

ab=[[0]*2 for i in range(n)]
maxa=0

for i in range(0,n):
  ab[i][0], ab[i][1] = map(int, input().split())
  if maxa<ab[i][0]:
    maxa=ab[i][0]

sab=sorted(ab,key=lambda x:-x[0]*10**5+x[1])

ans=[0]*(h+maxa)
maxl=2*10**8

for i in range(1,h+maxa):
  ans[i]=maxl
  for j in range(0,n):
    if (i-sab[j][0]) >= 0:
      if ans[i] > (ans[i-sab[j][0]]+sab[j][1]):
        ans[i] = ans[i-sab[j][0]]+sab[j][1]

print(min(ans[h:h+maxa-1]))
Problem p02705 (python)

Fixed submission:
import math 
R = int(input())
ans = math.pi*2*R
print(ans)

Buggy submission (verdict: Runtime Error):
import math 
R = int(input)
ans = math.pi*2*R
print(ans)
Problem p02957 (python)

Fixed submission:
A,B = map(int,input().split())
if (A+B)%2 != 0:
  print("IMPOSSIBLE")
else:
  print((A+B)//2)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
K = (A+B)/2
if == isinstance(K,float):
  print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
K = (A+B)/2
if != isinstance(K):
  print("IMPOSSIBLE")
Problem p03323 (python)

Fixed submission:
a, b = map(int,input().split())
if a > 8 or b > 8:
  print(":(")
else:
  print("Yay!")

Buggy submission (verdict: Runtime Error):
a, b = input().split()
if a > 8 or b > 8:
  print(":(")
else:
  print("Yay!")

Buggy submission (verdict: Runtime Error):
a, b = input().split()
if (a or b) > 8:
  print(":(")
else:
  print("Yay!")
Problem p02612 (python)

Fixed submission:
n = input()
n = n[-3:]
if n == '000':
  print('0')
else:
  print(str(1000 - int(n)))

Buggy submission (verdict: Runtime Error):
n = input()
n = n[-3:]
if n == '000':
  print('0')
else:
  print(str(1000 - int(n))
Problem p02613 (python)

Fixed submission:
n = int(input())
judge = list(input() for _ in range(n))
ac = wa = tle = re = 0
for i in judge:
  if i == 'AC':
    ac = ac + 1
  elif i == 'WA':
    wa = wa + 1
  elif i == 'TLE':
    tle = tle + 1
  elif i == 'RE':
    re = re + 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))

Buggy submission (verdict: Runtime Error):
n = int(input())
judge = list(input() for _ in range(n))
ac, wa, tle, re = 0
for i in judge:
  if i == 'AC':
    ac = ac + 1
  elif i == 'WA':
    wa = wa + 1
  elif i == 'TLE':
    tle = tle + 1
  elif i == 'RE':
    re = re + 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))

Buggy submission (verdict: Runtime Error):
n = int(input())
judge = list(int(input()) for _ in range(n))
ac, wa, tle, re = 0
for i in judge:
  if i == 'AC':
    ac = ac + 1
  elif i == 'WA':
    wa = wa + 1
  elif i == 'TLE':
    tle = tle + 1
  elif i == 'RE':
    re = re + 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))
Problem p02628 (python)

Fixed submission:
n, k = input().split()
lists = list(input().split())
for i in range(int(n)):
    lists[i] = int(lists[i])
lists.sort()
sum_fruit = 0
for i in range(int(k)):
  sum_fruit = sum_fruit + int(lists.pop(0))
print(str(sum_fruit))

Buggy submission (verdict: Runtime Error):
n, k = input().split()
lists = list(input().split())
for i in range(int(n)):
    lists[i] = int(lists[i])
lists.sort()
for i in range(int(k)):
  sum_fruit = sum_fruit + int(lists.pop(0))
print(str(sum_fruit))
Problem p02639 (python)

Fixed submission:
lists = list(input().split())
counter = 1
for i in lists:
  if i == '0':
    break
  counter = counter + 1
print(str(counter))

Buggy submission (verdict: Runtime Error):
lists = list(input.split())
counter = 0
for i in lists:
  if i == '0':
    break
  counter = counter + 1
print(str(counter))
Problem p02640 (python)

Fixed submission:
x, y = map(int, input().split())
if y % 2 == 1:
  print('No')
elif x * 4 < y:
  print('No')
elif x * 2 > y:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
x, y = map(int, input.split())
if y % 2 == 1:
  print('No')
elif x * 4 < y:
  print('No')
elif x * 2 > y:
  print('No')
else:
  print('Yes')
Problem p02658 (python)

Fixed submission:
n = int(input())
lists = list(map(int, input().split()))
number = 1
if 0 in lists:
  number = 0
else:
  for j in lists:
    number = number * j
    if number > 10 ** 18:
      number = -1
      break
print(str(number))

Buggy submission (verdict: Runtime Error):
n = int(input())
lists = list(int(input()) for i in range(n))
number = 1
for j in lists:
  if number == 0:
    number = 0
    break
  number = number * j
  if number > 10**18:
    number = -1
    break
print(number)
Problem p02675 (python)

Fixed submission:
N = str(input())
identify = N[-1]
answer = ''
pon_list = ['0','1', '6', '8']
bon_list = ['3']
if identify in pon_list:
  answer = 'pon'
elif identify in bon_list:
  answer = 'bon'
else:
  answer = 'hon'
print(answer)

Buggy submission (verdict: Runtime Error):
N = str(N)
identify = N[-1]
answer = 'hon'
pon_list = ['0','1', '6', '8']
bon_list = ['3']
if identify in pon_list:
  answer = 'pon'
elif identify in bon_list:
  answer = 'bon'
print(answer)

Buggy submission (verdict: Runtime Error):
N = str(N)
answer = 'hon'
pon_list = [0, 1, 6, 8]
bon_list = [3]
if N[-1] in bon_list:
  answer = 'bon'
elif N[-1] in pon_list:
  answer = 'pon'
print(answer)
Problem p02677 (python)

Fixed submission:
import math
ji, hun, H, M = input().split()
ji = int(ji)
hun = int(hun)
H = int(H)
M = int(M)
ji_rad = 30 * H + 0.5 * M
hun_rad = 6 * M
diff = abs(ji_rad - hun_rad)
if diff == 0:
  answer = abs(ji - hun)
elif diff == 180:
  answer = ji + hun
else:
  if diff > 180:
      diff = abs(360 - diff)
  answer = math.sqrt((ji ** 2) + (hun ** 2) - 2 * ji * hun * math.cos(math.radians(diff)))
print(answer)

Buggy submission (verdict: Runtime Error):
import math
tan, tyou, hour, minute = input()
tan_rad = 30 * hour + 0.5 * minute
tyou_rad = 6 * minute
if tan_rad == tyon_rad:
  answer = abs(tyou - tan)
elif abs(tan_rad - tyon_rad) == 180:
  answer = tyou + tan
else:
  rad = abs(tan_rad - tyou_rad)
  if rad > 180:
    rad = 360 - rad
  answer = math.sqrt((tan ** 2) + (tyou ** 2) - 2 * tan * tyou * math.cos(rad))
print(answer)

Buggy submission (verdict: Runtime Error):
import math
tan, tyou, hour, minute = input()
tan_rad = 30 * hour + 0.5 * minute
tyou_rad = 6 * minute
if tan_rad == tyon_rad:
  answer = abs(tyou - tan)
else:
  rad = abs(tan_rad - tyou_rad)
  if rad > 180:
    rad = 360 - rad
  answer = math.sqrt((tan ** 2) + (tyou ** 2) - 2 * tan * tyou * math.cos(rad))
print(answer)

Buggy submission (verdict: Runtime Error):
import math
tan, tyou, hour, minute = input()
tan_rad = 30 * hour + 0.5 * minute
tyou_rad = 6 * minute
if tan_rad == tyon_rad:
  answer = abs(tyou - tan)
else:
  rad = abs(tan_rad - tyou_rad)
if rad:
  answer = math.sqrt((tan ** 2) + (tyou ** 2) - 2 * tan * tyou * math.cos(rad))
print(answer)

Buggy submission (verdict: Runtime Error):
import math
tan, tyou, hour, minute = input()
tan_rad = 30 * hour + 0.5 * minute
tyou_rad = 6 * minute
if tan_rad == tyon_rad:
  answer = abs(tyou - tan)
else:
  rad = abs(tan_rad - tyou_rad)
if rad:
  answer = math.sqrt((tan ** 2) + (tyou ** 2) - 2 * tan * tyou * math.cos(math.radius(rad)))
print(answer)

Buggy submission (verdict: Runtime Error):
import math
tan, tyou, hour, minute = input()
tan_rad = 30 * hour
tyou_rad = 6 * minute
if tan_rad == tyon_rad:
  answer = abs(tyou - tan)
else:
  rad = abs(tan_rad - tyou_rad)
if rad:
  answer = math.sqrt((tan ** 2) + (tyou ** 2) - 2 * tan * tyou * math.cos(math.radius(rad)))
print(answer)

Buggy submission (verdict: Runtime Error):
import math
tan, tyou, hour, minute = input()
tan_rad = 30 * hour
tyou_rad = 6 * minute
if tan_rad == tyon_rad:
  answer = abs(tyou - tan)
else:
  rad = abs(tan_rad - tyou_rad)
if rad:
  answer = math.sqrt((tan ** 2) + (tyou ** 2) - 2 * tan * tyou * math.sin(math.radius(rad)))
print(answer)
Problem p02743 (python)

Fixed submission:
# coding: utf-8
# Your code here!
import math
from decimal import Decimal
a, b, c = map(int, input().split())
if Decimal(str(a * b))**Decimal('0.5') >= Decimal(str((c - a - b) / 2)):
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!
import math
from decimal import Decimal
a, b, c = map(int, input().split())
if Decimal(str(a * b))**Decimal('0.5') > Decimal(str((c - a - b) / 2))
  print('No')
else:
  print('Yes')
Problem p02922 (python)

Fixed submission:
a, b = map(int, input().split())
result = 0
while result * (a - 1) + 1 < b:
  result = result + 1
print(str(result))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
result = 0
while result * (a - 1) + 1 > b:
  result ++
print(str(result))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
result = 0
while result * a + 1 > b:
  result ++
print(str(result))