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

Fixed submission:
import statistics
import math

a = list(map(int,input().split()))
print( math.ceil(statistics.mean(a)))

Buggy submission (verdict: Runtime Error):
a = [input() for i in range(2)]

sp = "".join(sorted(list(a[0])))
tmp = list(a[1])
tmp.sort()
tmp.reverse()
tp = "".join(tmp)  
if sp < tp:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a = [input() for i in range(2)]
     
sp = "".join(sorted(list(a[0])))
tmp = list(a[1])
tmp.sort()
tmp.reverse()
tp = "".join(tmp)
     
if sp < tp:
    print("Yes")
else:
    print("No")
Problem p03486 (python)

Fixed submission:
a = [input() for i in range(2)]

sp = "".join(sorted(list(a[0])))
tmp = list(a[1])
tmp.sort()
tmp.reverse()
tp = "".join(tmp)

if sp < tp:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = [input() for i in range(2)]

sp = "".join(sorted(list(a[0])))
tmp = list(a[1])
tmp.sort().reverse()
tp = "".join(tmp)

if sp < tp:
  print("Yes")
else:
  print("No")
Problem p02641 (python)

Fixed submission:
def linked_merge_sort(l): #マージソート
    if len(l) == 1:
        return
    q, r = divmod(len(l), 2)
    left = [l.pop() for _ in range(q)]
    right = [l.pop() for _ in range(q + r)]
    
    linked_merge_sort(left)
    linked_merge_sort(right)
    
    left.reverse()
    right.reverse()
    while left and right:
        if left[-1] <= right[-1]:
            l.append(left.pop())
        else:
            l.append(right.pop())
    while left:
        l.append(left.pop())
    while right:
        l.append(right.pop())
    return

x,n=map(int,input().split())
p=list(map(int,input().split()))
if x>50:
    ans = 101
else:
    ans = 0
for i in range(n):
    p[i]=p[i]-x
if n>1:
    linked_merge_sort(p)
    j=n-1
    for i in range(n):
        if p[i]>=0:
            j=i
            break
    for i in range(n):
        if j-i>=0:
            if p[j-i]!=-i:
                ans = x-i
                break
        elif j-i<0:
            ans=x+p[0]-1
            break
        if j+i<n:
            if p[j+i]!=i:
                ans = x+i
                break
        else:
            ans=x+p[n-1]+1
            break
elif n==1:
    if p[0]==0:
        ans=x-1
    else:
        ans=x
elif n==0:
    ans=x
print(ans)

Buggy submission (verdict: Runtime Error):
def linked_merge_sort(l): #マージソート
    if len(l) == 1:
        return
    q, r = divmod(len(l), 2)
    left = [l.pop() for _ in range(q)]
    right = [l.pop() for _ in range(q + r)]
    
    linked_merge_sort(left)
    linked_merge_sort(right)
    
    left.reverse()
    right.reverse()
    while left and right:
        if left[-1] <= right[-1]:
            l.append(left.pop())
        else:
            l.append(right.pop())
    while left:
        l.append(left.pop())
    while right:
        l.append(right.pop())
    return

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

for i in range(n):
    p[i]=p[i]-x
if n>1:
    linked_merge_sort(p)
    j=n-1
    for i in range(n):
        if p[i]>=0:
            j=i
            break
    for i in range(50):
        if j-i>=0:
            if p[j-i]!=-i:
                ans = x-i
                break
        elif j-i<0:
            ans=x+p[0]-1
            break
        if j+i<n:
            if p[j+i]!=i:
                ans = x+i
                break
        else:
            ans=x+p[n-1]+1
            break
elif n==1:
    if p[0]==0:
        ans=x-1
    else:
        ans=x
elif n==0:
    ans=x
print(ans)
Problem p02646 (python)

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

x=b-a
if x<0:
    x= -x
y=v-w

if y*t>=x:
    print("YES")
else:
    print("NO")

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

x=b-a
y=v-w

if y*t>=x and x%y==0:
    print("YES")
else:
    print("NO")

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

x=b-a
y=v-w

if y*t>x and x%y==0:
    print("YES")
else:
    print("NO")
Problem p02696 (python)

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

if n >= b:
    print(((a*(-1))//b) - (a*((-1)//b)))
else:
    print(((a*n)//b) - (a*(n//b)))

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

x = 1
m = 0
while x <= b:
    m_x = (x/b) - (x//b)
    if m_x > m:
        i = x
        m = m_x
    x += 1
w = 0
while x > n:
    x = (n//b) + i - w
    w += 1
ans = ((a*x)//b) - (a*(x//b))
print(int(ans))
Problem p02658 (python)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int,input().split()))
    if 0 in A: 
        print (0)
        return
    prod = 1 
    for a in A:
        prod *= a
        if prod > 1000000000000000000:
            print(-1) 
            return
    print(prod) 

main()

Buggy submission (verdict: Runtime Error):
def main ():
    N = int(input())
    A = list(map(int,input().split()))
    if 0 in A: 
        print (0)
        return
    prod = 1 
    for a in A:
        prod *= a
        if prod > 1000000000000000000:
        print(-1) 
        return
    print(prod) 
main ()
Problem p02717 (python)

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

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

print(b,a)
Problem p02765 (python)

Fixed submission:
N,R=map(int,input().split())
print(R if N>=10 else R+(100*(10-N)))

Buggy submission (verdict: Runtime Error):
N,R=map(int,input().split())
print(R if N>=10 else R+(100*(10-K)))
Problem p02801 (python)

Fixed submission:
s=input()
print(chr(ord(s)+1))

Buggy submission (verdict: Runtime Error):
c=input()
print(c+1)
Problem p02999 (python)

Fixed submission:
X,A=map(int,input().split())
if X<A:
  print(0)
else:
  print(10)

Buggy submission (verdict: Runtime Error):
X,A=int(input())
if X<A:
  print(0)
else:
  print(10)
Problem p03777 (python)

Fixed submission:
a,b=input().split()
if a==b:
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a==b:
  print("H")
else:
  print("D")
Problem p02681 (python)

Fixed submission:
s = input()
t = input()
flag = 1
for i in range(len(s)):
    if s[i] != t[i]:
        flag = 0
        break

if flag and len(t) == len(s) + 1:
    print("Yes")
else:
    print("No")

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

if k <= a:
    print(k)
elif k <= a + b:
    print(a)
elif k > a + b:
    print(a - (k - (a + b)))
Problem p03136 (python)

Fixed submission:
N = int(input())
listL = [int(i) for i in raw_input().split()]
maxL = max(listL)
sum = 0
for i in range(N):
    sum = sum + listL[i]

sum = sum - maxL

if maxL < sum:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
listL = [int(i) for i in raw_input().split()]
maxL = max(listL)
sum = 0
for i in range(N):
    sum = sum + listL[i]

sum = sum - maxL

if maxL < sum:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
listL = [int(i) for i in input().split()]
maxL = max(listL)

for i in range(N)
	sum += listL[i-1]
  
sum = sum - maxL

if maxL < sum:
	print("Yes")
else:
	print("No")
Problem p04044 (python)

Fixed submission:
from sys import stdin
input = stdin.readline

N, L = map(int, input().split())
D = []

for i in range(N):
    D.append(input().strip())
D.sort()
print(''.join(D))

Buggy submission (verdict: Runtime Error):
from sys import stdin
input = stdin.readline

L, N = map(int, input().split())
D = []

for i in range(N):
    D.append(input()

D.sort()

print(''.join(D))
Problem p02583 (python)

Fixed submission:
r=int(input())
x=list(map(int,input().split()))
setx=list(set(x))
setx.sort()
cx=[]
for i in setx:
    cx.append(x.count(i))
ans=0
A=0
while A<=len(setx)-3:
    B=A+1
    while B<=len(setx)-2:
        C=B+1
        while C<=len(setx)-1:
            if setx[A]+setx[B]>setx[C]:
                ans+=cx[A]*cx[B]*cx[C]
            C+=1
        B+=1
    A+=1
print(ans)

Buggy submission (verdict: Runtime Error):
r=int(input())
x=list(map(int,input().split())
setx=list(set(x))
setx.sort()
cx=[]
for i in setx:
    cx.append(x.count(i))
ans=0
A=0
while A<=len(setx)-3:
    B=A+1
    while B<=len(setx)-2:
        C=B+1
        while C<=len(setx)-1:
            if setx[A]+setx[B]>setx[C]:
                ans+=cx[A]*cx[B]*cx[C]
            C+=1
        B+=1
    A+=1
print(ans)

Buggy submission (verdict: Runtime Error):
r=int(input())
x=list(map(int,input().split())
setx=list(set(x))
setx.sort()
cx=[]
for i in setx:
    cx.append(x.count(i))
ans=0
A=0
while A<=len(setx)-3:
    B=A+1
    while B<=len(setx)-2:
        C=B+1
        while C<=len(setx)-1:
            if setx[A]+setx[B]>setx[C]:
                ans+=cx[A]*cx[B]*cx[C]
            C+=1
        B+=1
    A+=1
print(ans)
Problem p03165 (python)

Fixed submission:
s=input()
t=input()
dp=[[0]*(len(t)+1) for i in range(len(s)+1)]

for i in range(1,len(s)+1):
    for j in range(1,len(t)+1):
        if s[i-1]==t[j-1]:
            dp[i][j]=dp[i-1][j-1]+1

        else:
            dp[i][j]=max(dp[i-1][j],dp[i][j-1])
    # print(dp[i])
ans=''
i,j=len(s),len(t)
while i > 0 and j > 0:
  if s[i-1]==t[j-1]:
    ans=s[i-1]+ans
    i=i-1
    j=j-1
  else:
    if dp[i-1][j]>dp[i][j-1]:
      i-=1
    else:
      j-=1
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()

ls=len(s)
lt=len(t)

dp=[[0]*(lt+1) for _ in range(ls+1)]

for i in range(ls):
    for j in range(lt):
        if s[i]==t[j]:
            dp[i+1][j+1]=dp[i][j]+1
        else:
            dp[i+1][j+1]=max(dp[i+1][j],dp[i][j+1])

ans=""
l=dp[ls][lt]-1
i=ls-1
j=lt-1
while l>=0:
    if s[i]==t[j]:
        ans=s[i]+ans
        i-=1
        j-=1
        l-=1
    else:
      	if dp[i-1][j]>dp[i][j-1]:
        	i-=1
    	else:
        	j-=1

print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()

ls=len(s)
lt=len(t)

dp=[[0]*(lt+1) for _ in range(ls+1)]

for i in range(ls):
    for j in range(lt):
        if s[i]==t[j]:
            dp[i+1][j+1]=dp[i][j]+1
        else:
            dp[i+1][j+1]=max(dp[i+1][j],dp[i][j+1])

ans=""
l=dp[ls][lt]-1
i=ls-1
j=lt-1
while l>=0:
    if s[i]==t[j]:
        ans=s[i]+ans
        i-=1
        j-=1
        l-=1
    else:
      	if dp[i-1][j]>dp[i][j-1]:
        i-=1
    else:
        j-=1

print(ans)
Problem p02717 (python)

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

x, y = y, x
x, z = z, x

print(x, y, z)

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

a.sort(reverse=True)

thold = sum(a) // (4 * m)

if a[m] <= thold:
    print('No')
else:
    print('Yes')
Problem p02718 (python)

Fixed submission:
from math import ceil

n, m = map(int, input().split())
a = list(map(int, input().split()))

a.sort(reverse=True)

thold = ceil(sum(a) / (4 * m))

if a[m-1] < thold:
    print('No')
else:
    print('Yes')

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

a.sort(reverse=True)

thold = sum(a) // (4 * m)

if a[m] <= thold:
    print('No')
else:
    print('Yes')

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

thold = sum(a) / (4 * m)

if a[m] < thold:
    print('No')
else:
    print('Yes')
Problem p02885 (python)

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

print(max(a - 2 * b, 0))

Buggy submission (verdict: Runtime Error):
import itertools as it 

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

l.sort()

triangles = set()
for a, b, c in it.combinations(l, 3):
    if a + b > c and b + c > a and a + c > b:
        triangles.add((a, b, c))

print(len(triangles))
Problem p02900 (python)

Fixed submission:
import math
 
 
def gcd(a, b):
    while b:
        a, b = b, a%b
    return a
  
 
a, b = map(int, input().split())
 
gcd = gcd(a, b)
 
res = set([1])
while gcd % 2 == 0: 
        res.add(2)
        gcd = gcd // 2
 
for i in range(3,int(math.sqrt(gcd))+1,2): 
    while gcd % i == 0: 
        res.add(i)
        gcd = gcd // i 
            
if gcd > 2: 
    res.add(gcd)
 
print(len(res))

Buggy submission (verdict: Runtime Error):
import math

a, b = map(int, input().split())

gcd = math.gcd(a, b)

res = set([1])
while gcd % 2 == 0: 
        res.add(2)
        gcd = gcd // 2

for i in range(3,int(math.sqrt(gcd))+1,2): 
    while gcd % i == 0: 
        res.add(i)
        gcd = gcd // i 
            
if gcd > 2: 
    res.add(gcd)

print(len(res))
Problem p02917 (python)

Fixed submission:
n = int(input())
b = list(map(int, input().split()))
a = [b[0]]*2

for i in range(1, n-1):
    a.append(b[i])
    if b[i] < b[i-1]:
        a[i] = b[i]

print(sum(a))

Buggy submission (verdict: Runtime Error):
n = int(input())
b = list(map(int, input().split()))
a = [b[0]]*2

for i in range(1, n-1):
    if b[i] >= b[i-1]:
        a.append(b[i])
    else:
        a[i] = b[i]
        a[i-1] = b[i]

print(sum(a))

Buggy submission (verdict: Runtime Error):
n = int(input())
b = list(map(int, input().split()))
a = [b[0]]*2

for i in range(1, n-1):
    if b[i] >= b[i-1]:
        a.append(b[i])
    else:
        a[i] = b[i]
        a[i-1] = b[i]

print(sum(a))
Problem p02918 (python)

Fixed submission:
n, k = map(int, input().split())
s = input()
count = 0
s = 'X' + s + 'X'
for i in range(1, n+1):
    #print(f's[i]: {s[i]} s[i-1]: {s[i-1]} s[i+1]:{s[i+1]}')
    if (s[i] == s[i-1] and s[i] == 'L') or \
        (s[i] == s[i+1] and s[i] == 'R'):
        count += 1
print(min(n-1, count + 2*k))

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = input()
count = 0
s = 'X' + s + 'X'
for i in range(1, n+1):
    print(f's[i]: {s[i]} s[i-1]: {s[i-1]} s[i+1]:{s[i+1]}')
    if (s[i] == s[i-1] and s[i] == 'L') or \
        (s[i] == s[i+1] and s[i] == 'R'):
        count += 1
if count == n-2:
    print(count + 1)
else:
    print(count + 2*k)
Problem p03061 (python)

Fixed submission:
def gcd(x, y): 
   while(y): 
       x, y = y, x % y 
  
   return x

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

Prefix=[0 for i in range(n + 2)] 
Suffix=[0 for i in range(n + 2)] 

Prefix[1] = a[0] 
for i in range(2,n+1): 
    Prefix[i] = gcd(Prefix[i - 1], a[i - 1]) 

Suffix[n] = a[n - 1] 

for i in range(n-1,0,-1): 
    Suffix[i] = gcd(Suffix[i + 1], a[i - 1]) 

ans = max(Suffix[2], Prefix[n - 1]) 

for i in range(2,n): 
    ans = max(ans, gcd(Prefix[i - 1], Suffix[i + 1])) 

print(ans)

Buggy submission (verdict: Runtime Error):
import math

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

Prefix=[0 for i in range(n + 2)] 
Suffix=[0 for i in range(n + 2)] 

Prefix[1] = a[0] 
for i in range(2,n+1): 
    Prefix[i] = math.gcd(Prefix[i - 1], a[i - 1]) 

Suffix[n] = a[n - 1] 

for i in range(n-1,0,-1): 
    Suffix[i] =math.gcd(Suffix[i + 1], a[i - 1]) 

ans = max(Suffix[2], Prefix[n - 1]) 

for i in range(2,n): 
    ans = max(ans, math.gcd(Prefix[i - 1], Suffix[i + 1])) 

print(ans)
Problem p03076 (python)

Fixed submission:
time = []
total = 0
for _ in range(5):
    t = int(input())
    if t % 10 == 0:
        total += t
    else:
        total += (t//10+1)*10
        time.append(t)
if time:
    last = min(time, key=lambda x: int(str(x)[-1]))
    print(total - 10+last%10)
else:
    print(total)

Buggy submission (verdict: Runtime Error):
time = []
total = 0
for _ in range(5):
    t = int(input())
    if t % 10 == 0:
        total += t
    else:
        total += (t//10+1)*10
        time.append(t)

last = min(time, key=lambda x: int(str(x)[-1]))

print(total - 10+last%10)
Problem p03160 (python)

Fixed submission:
import sys
from functools import lru_cache

sys.setrecursionlimit(10 ** 7)

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

@lru_cache(maxsize=None)
def f(n):
    if n == 0:
        return 0
    elif n == 1:
        return abs(h[1] - h[0])
    return min(f(n-2) + abs(h[n] - h[n-2]), f(n-1) + abs(h[n] - h[n-1]))

print(f(n-1))

Buggy submission (verdict: Runtime Error):
from functools import lru_cache

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

@lru_cache(maxsize=None)
def f(n):
    if n == 0:
        return 0
    elif n == 1:
        return abs(h[1] - h[0])
    return min(f(n-2) + abs(h[n] - h[n-2]), f(n-1) + abs(h[n] - h[n-1]))

print(f(n-1))

Buggy submission (verdict: Runtime Error):
from functools import lru_cache

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

@lru_cache(maxsize=4)
def f(n):
    if n == 0:
        return 0
    elif n == 1:
        return abs(h[1] - h[0])
    return min(f(n-2) + abs(h[n] - h[n-2]), f(n-1) + abs(h[n] - h[n-1]))

print(f(n-1))

Buggy submission (verdict: Runtime Error):
from functools import lru_cache

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

@lru_cache(maxsize=2)
def f(n):
    if n == 0:
        return 0
    elif n == 1:
        return abs(h[1] - h[0])
    return min(f(n-2) + abs(h[n] - h[n-2]), f(n-1) + abs(h[n] - h[n-1]))

print(f(n-1))
Problem p02818 (python)

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

if A-K<=0:
	B=B+A-K
	A=0
	if B<=0:
		B=0
if A-K>0:
	B=B
	A=A-K
print(A,B)

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

if A-K<=0:
	B=B+A-K
	A=0
	if B<=0:
		B=0
if A-K>0:
	B=B-(A-K)
	A=A-K
    if B<=0:
		B=0
print(A,B)
Problem p04043 (python)

Fixed submission:
s=input().rstrip().split()

if int(s[0])==5 and int(s[1])==5 and int(s[2])==7:
  print("YES")
elif int(s[0])==7 and int(s[1])==5 and int(s[2])==5:
  print("YES")
elif int(s[0])==5 and int(s[1])==7 and int(s[2])==5:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
line=input().split()
N=int(line[0])
K=int(line[1])
D=input().rstrip().split()

for i in range(N,10*N+1):
	s=str(i)
	flag=True
	for x in D:
		if x in s:
			flag=False
			break

	if flag:
		print(s)
    	break
	else:
		continue
Problem p04045 (python)

Fixed submission:
line=input().split()
N=int(line[0])
K=int(line[1])
D=input().rstrip().split()

for i in range(N,10*N+1):
 s=str(i)
 flag=True
 for x in D:
  if x in s:
   flag=False
   break

 if flag:
  print(s)
  break
 else:
  continue

Buggy submission (verdict: Runtime Error):
line=input().split()

N=int(line[0])
K=int(line[1])

D=input().rstrip().split()


for i in range(N,10*N+1):
	s=str(i)
	flag=True
    for x in D:
		if x in s:
			flag=False
			break

	if flag:
		print(s)
		break
    
	else:
    	continue
Problem p02621 (python)

Fixed submission:
a = int(input())
ans =(a + a ** 2 + a ** 3) // 1
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(10**6)
N, M, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
A.append(99999)
B.append(99999)
Sum = 0
i = 0
j = 0
while True:
  if A[i] <= B[j] and Sum + A[i] <= K:
    Sum += A[i]
    i += 1
  elif A[i] > B[j] and Sum + B[j] <= K:
    Sum += B[j]
    j += 1
  else:
    break
print(i + j)
Problem p02675 (python)

Fixed submission:
N = int(input())
NS = str(N)
if NS[len(NS) - 1] == "3":
  ans = "bon"
elif NS[len(NS) - 1] == "0":
  ans = "pon"
elif NS[len(NS) - 1] == "1":
  ans = "pon"
elif NS[len(NS) - 1] == "6":
  ans = "pon"
elif NS[len(NS) - 1] == "8":
  ans = "pon"
else:
  ans = "hon"
print(ans)

Buggy submission (verdict: Runtime Error):
import math
A, B, H, M = map(int, input().split())
Mkaku = 6 * M
Hkaku = (H * 60 + M) / 2
r1 = Hkaku * math.pi / 180
r2 = Mkaku * math.pi / 180
v1x = A * math.cos(r1)
v1y = A * math.sin(r1)
v2x = B * math.cos(r2)
v2y = B * math.sin(r2)
ans = ((v1x - v2x) ** 2 + (v1y - v2y) ** 2) ** 1/2
print(ans)
Problem p02677 (python)

Fixed submission:
import math
A, B, H, M = map(int, input().split())
Mkaku = 6 * M
Hkaku = (H * 60 + M) / 2
r1 = Hkaku * math.pi / 180
r2 = Mkaku * math.pi / 180
v1x = A * math.cos(r1)
v1y = A * math.sin(r1)
v2x = B * math.cos(r2)
v2y = B * math.sin(r2)
ans = ((v1x - v2x) ** 2 + (v1y - v2y) ** 2) ** (1 / 2)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
A B H M = map(int, input().split())
Mkaku = 6 * M
Hkaku = (H * 60 + M) / 2
r1 = Hkaku * math.pi / 180
r2 = Mkaku * math.pi / 180
v1x = A * math.cos(r1)
v1y = A * math.sin(r1)
v2x = B * math.cos(r2)
v2y = B * math.sin(r2)
ans = ((v1x - v2x) ** 2 + (v1y - v2y) ** 2) ** 1/2
print(ans)

Buggy submission (verdict: Runtime Error):
import math
A B H M = map(int, input().split())
Mkaku = 6 * M
Hkaku = (H * 60 + M) / 2
d1 = abs(Mkaku - Hkaku)
d2 = 360 - d1
distance = min(d1, d2)
r = distance * math.pi / 180
v1x = A * math.cos(r)
v1y = A * math.sin(r)
v2x = B * math.cos(r)
v2y = B * math.sin(r)
ans = ((v1x - v2x) ** 2 + (v1y - v2y) ** 2) ** 1/2
print(ans)
Problem p02681 (python)

Fixed submission:
A = input()
B = input()
C = B[:len(B)-1]
if A == C:
  D = "Yes"
else:
  D = "No"
print(D)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
C = B.rstrip()
if A == C:
  D = "Yes"
  else:
    D = "No"
print(D)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
C = B[:len(B)-2]
if A == C:
  D = "Yes"
  else:
    D = "No"
print(D)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
C = B[:len(B) - 1]
if A == C:
  D = "Yes"
  else:
    D = "No"
print(D)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
C = B[:len(B)]
if A == C:
  D = "Yes"
  else:
    D = "No"
print(D)

Buggy submission (verdict: Runtime Error):
A = input()
B = input()
C = print(B[:len(B)])
if A == C:
  D = "Yes"
  else:
    D = "No"
print(D)
Problem p03434 (python)

Fixed submission:
N = input()
List = map(int, input().split())
nList = sorted(List)[::-1]
print(sum(nList[::2]) - sum(nList[1::2]))

Buggy submission (verdict: Runtime Error):
N = input()
List = map(int, input().split())
newList = sorted(List)[::-1]
print(sum(List[::2]) - sum(List[1::2]))

Buggy submission (verdict: Runtime Error):
N = input()
List = map(int, input().split())
newList = sorted(List)[::-1]
print(sum(newList)[::2] - sum(newList)[1::2])

Buggy submission (verdict: Runtime Error):
N = input()
List = map(int, input().split())
newList = sorted(List)[::-1]
print(sum(List)[::2] - sum(List)[1::2])
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int(input()).split())
seki = a * b
sekito = seki % 2
if sekito == 1:
  response = "Odd"
else :
  response = "Even"
print(response)

Buggy submission (verdict: Runtime Error):
a, b = map(int(input()).split())
seki = a * b
sekito = seki % 2
if sekito == 1:
  response = 'Odd'
else :
  response = 'Even'
print(response)

Buggy submission (verdict: Runtime Error):
a, b = int(input()).split()
seki = a * b
sekito = seki % 2
if sekito == 1:
  response = 'Odd'
else :
  response = 'Even'
print(response)

Buggy submission (verdict: Runtime Error):
a, b = int(input()).split()
sum = a * b
sumto = sum % 2
if sumto == 1:
  response = 'Odd'
else:
  response = 'Even'
  return response

Buggy submission (verdict: Runtime Error):
a, b = int(input()).split()
seki = a * b
sekito = seki % 2
if sekito = 1:
  response = 'Odd'
else:
  response = 'Even'
  return response

Buggy submission (verdict: Runtime Error):
a, b = int(input()).split
sum = a + b
sumto = sum % 2
if sumto = 1:
  response = 'Odd'
else:
  response = 'Even'
  return response

Buggy submission (verdict: Runtime Error):
sum = a + b
sumto = sum % 2
if sumto = 1:
  response = 'Odd'
else:
  response = 'Even'
return response

Buggy submission (verdict: Runtime Error):
def evenodd(a, b):
  sum = a + b
  sumto = sum % 2
  if sumto = 1:
    response = 'Odd'
  else:
    response = 'Even'
  return response
Problem p03470 (python)

Fixed submission:
N = int(input())
d = [input() for i in range(N)]
print(len(set(d)))

Buggy submission (verdict: Runtime Error):
N = int(input())
d = [input() for i in range(N)]
print(len((set(d)))

Buggy submission (verdict: Runtime Error):
N = int(input())
d = [input() for i in range(N)]
print(len((set(d)))

Buggy submission (verdict: Runtime Error):
N = input()
d = [input() for i in range(N)]
print(len((set(d)))