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

Fixed submission:
n,k=map(int,input().split())
seq=list(map(int,input().split()))
v=[False]*n
path=[1]
i=0
v[0]=True
while True:
        if v[seq[i]-1]==False:
                v[seq[i]-1]=True
                path.append(seq[i])
                i=seq[i]-1
                
        else:
                t=seq[i]
                break

ind=path.index(t)
path2=path[ind:]
path1=path[:ind]
x=len(path1)
if k>=x:
        k-=x
        #print(t,ind,path1,path2)
        print(path2[(k%len(path2))])

else:
        print(path1[k])

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
seq=list(map(int,input().split()))
v=[False]*n
path=[]
i=seq.index(1)
while True:
        if v[seq[i]-1]==False:
                v[seq[i]-1]=True
                path.append(seq[i])
                i=seq[i]-1
                
        else:
                break
print(path[(k%len(path))])
print(path)
Problem p02713 (python)

Fixed submission:
from math import gcd

line = int(input())

ans = 0

for a in range(1, line + 1):
    for b in range(1, line + 1):
        c = gcd(a,b)
        for d in range(1, line + 1):
            ans += gcd(d,c)
print(ans)

Buggy submission (verdict: Runtime Error):
def gcd(*numbers):
    return reduce(math.gcd, numbers)

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

line = int(input())

a = list(range(1,line + 1))
b = list(range(1,line + 1))
c = list(range(1,line + 1))

result = list(itertools.product(a,b,c))

all = 0

for i in result:
    tmp = gcd(i[0], i[1], i[2])
    all += tmp

print(all)
Problem p02719 (python)

Fixed submission:
def main():
    n,k = map(int,input().split())
    t = n % k
    x = k - t
    if t < x:
        print(t)
    else:
        print(x)
main()

Buggy submission (verdict: Runtime Error):
def abs_result(x,y):
    tmp = abs(x-y)
    return tmp

def main():
    line = list(map(int,input().split()))
    n,k = line[0],line[1]
    
    # nを、nとkの差の絶対値で置き換える
    if n == 0 or k == 1:
        print(0)
        return
    
    if n % 2 == 0 k % 2 == 0 and n < k:
        print(2)
    
    if n % 2 == 0 k % 2 == 0 and n > k:
        print(0)
        
    if n % 2 == 1 and k % 2 == 0 and n > k:
        print(1)
        
    
    com = 2
    for i in range(0,10**18):
        ans = abs_result(n,k)
        if ans == 0:
            print(0)
            return
        elif ans == 1:
            print(1)
            return
        if ans <= com:
            print(ans)
            return
        n = ans

main()
Problem p02760 (python)

Fixed submission:
array_1 = []
for i in range(3):
    line = input().rstrip().split(' ')
    array_1.append(line)
    
# print(array_1)

bool_array = []
for i in range(3):
    tmp = []
    for j in range(3):
        tmp.append(False)
    bool_array.append(tmp)

# print(bool_array)

num = int(input().rstrip())
for i in range(num):
    input_line = input().rstrip()
    for j in range(3):
        for k in range(3):
            if array_1[j][k] == input_line:
                bool_array[j][k] = True

ans = "No"
for i in range(3):
    if bool_array[i][0] and bool_array[i][1] and bool_array[i][2]:
        ans = 'Yes'

for i in range(3):
    if bool_array[0][i] and bool_array[1][i] and bool_array[2][i]:
        ans = 'Yes'

if bool_array[0][0] and bool_array[1][1] and bool_array[2][2]:
    ans = 'Yes'

if bool_array[0][2] and bool_array[1][1] and bool_array[2][0]:
    ans = 'Yes'
    
    
print(ans)

Buggy submission (verdict: Runtime Error):
for i in range(3):
    line = input().rstrip().split(' ')
    array_1.append(line)

bool_array = []
for i in range(3):
    tmp = []
    for j in range(3):
        tmp.append(False)
    bool_array.append(tmp)
num = int(input().rstrip())
for i in range(num):
    input_line = input().rstrip()
    for j in range(3):
        for k in range(3):
            if array_1[j][k] == input_line:
                bool_array[j][k] = True

ans = "No"
for i in range(3):
    if bool_array[i][0] and bool_array[i][1] and bool_array[i][2]:
        ans = 'Yes'

    if bool_array[0][i] and bool_array[1][i] and bool_array[2][i]:
        ans = 'Yes'

if bool_array[0][0] and bool_array[1][1] and bool_array[2][2]:
    ans = 'Yes'

if bool_array[0][2] and bool_array[1][1] and bool_array[2][0]:
    ans = 'Yes'
print(ans)
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())

print((a + b) * h // 2)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
h = int(input())

print((a + b) * h / / 2)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
h = input()

print((a + b) * h / 2)
Problem p02717 (python)

Fixed submission:
x = [int(i) for i in input().split(' ')]
print(x[2],' ',x[0], ' ',x[1])

Buggy submission (verdict: Runtime Error):
x = [int(i) for i in input().split(' ')]
print(x[3], x[0], x[1])
Problem p02658 (python)

Fixed submission:
import sys

N = int(input())
A = list(map(int, input().split()))

ans = 1

if 0 in A:
  print(0)
  sys.exit()

for i in range(N):
  ans *= A[i]
  if ans > 1e18:
    print(-1)
    sys.exit()
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np

N = int(input())
A = list(map(int, input().split()))

ans = np.prod(A)

if ans > 10**18:
  print(-1)
else:
  print(int(ans))
Problem p02677 (python)

Fixed submission:
import math
a, b, h, m = map(int, input().split())

big = max(30*h + (m*0.5), 6*m)
small = min(30*h + (m*0.5), 6*m)
gap = min(big - small, 360 - (big - small))

print(format(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(gap))), ".20f"))

Buggy submission (verdict: Runtime Error):
import math
from decimal import *
import sympy
a, b, h, m = map(int, input().split())

big = max(30*h, 6*m)
small = min(30*h, 6*m)
gap = min(big - small, 360 - (big - small)) + (m*0.5)


print(format(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(gap))), ".20f"))

Buggy submission (verdict: Runtime Error):
import math
from decimal import *
import sympy
a, b, h, m = map(int, input().split())

big = max(30*h, 6*m)
small = min(30*h, 6*m)
gap = min(big - small, 360 - (big - small)) + (m*0.5)


print(format(Decimal(a**2 + b**2 - 2*a*b*sympy.cos(sympy.radians(gap)))**Decimal("0.5"), ".20f"))

Buggy submission (verdict: Runtime Error):
import math
from decimal import *
import mpmath
a, b, h, m = map(int, input().split())

big = max(30*h, 6*m)
small = min(30*h, 6*m)
gap = min(big - small, 360 - (big - small)) + (m*0.5)


print(format(Decimal(a**2 + b**2 - 2*a*b*math.cos(mpmath.radians(gap)))**Decimal("0.5"), ".20f"))
Problem p02687 (python)

Fixed submission:
from sys import stdin

K = str(stdin.readline().strip())

if K=="ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
from sys import stdin

K = int(stdin.readline())

if K=="ABC":
  print("ARC")
else:
  print("ARC")
Problem p02687 (python)

Fixed submission:
S = input()

if S == "ABC":
  print("ARC")
else:
  print("ABC")

Buggy submission (verdict: Runtime Error):
S = input()

if S == "ABC":
  print(ARC)
else:
  print(ABC)
Problem p02628 (python)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int, input().split()))
         
p.sort()
ans = sum(p[:k])
print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
p = list(map(int, input().split())
p.sort()
ans = sum(p[:k])
print(ans)
Problem p02675 (python)

Fixed submission:
S = str(input())[-1]
tmp = ['0', '1', '6', '8']
if S == '3':
    print('bon')
elif S in tmp:
    print('pon')
else:
    print('hon')

Buggy submission (verdict: Runtime Error):
k=int(input())
s=str(input())
if len(s) <= k:
  print(s)
else:
  print(s[0:k] + "...")

Buggy submission (verdict: Runtime Error):
s=str(input())[-1]
 
if s in ["2", "4", "5", "7", "9"]:
  print("hon")
else if s == 3:
  print("bon")
else:
  print("pon")

Buggy submission (verdict: Runtime Error):
s=str(int(input()))[-1]
 
if s in ["2", "4", "5", "7", "9"]:
  print("hon")
else if s == 3:
  print("bon")
else:
  print("pon")

Buggy submission (verdict: Runtime Error):
s=str(int(input()))[-1]

if s in [2, 4, 5, 7, 9]:
  print("hon")
else if s == 3:
  print("bon")
else:
  print("pon")

Buggy submission (verdict: Runtime Error):
n=int(input())
s=str(n)
if s[-1] in [2, 4, 5, 7, 9]:
  print("hon")
else if s[-1] == 3:
  print("bon")
else:
  print("pon")

Buggy submission (verdict: Runtime Error):
n=int(input())
s=str(n)
if s[-1] == 2 or 4 or 5 or 7 or 9:
  print("hon")
else if s[-1] == 3:
  print("bon")
else:
  print("pon")
Problem p02681 (python)

Fixed submission:
s=str(input())
t=str(input())
if s == t[:-1] :
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())
if A >= K:
  print(K)
elif A+B >= K:
  print(A)
else:
  print(A-(K-A-B))

Buggy submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())
if K <= A:
  print(K)
else if A+B >= K:
  print(A)
else:
  print(A-(K-A-B))
Problem p03030 (python)

Fixed submission:
n = int(input())
sp = []
for i in range(n):
    s,p = map(str,input().split())
    sp.append([s,int(p),i+1])

sp.sort(key=lambda x:x[1],reverse = True)
sp.sort(key=lambda x:x[0])

for e in sp:
    print(e[2])

Buggy submission (verdict: Runtime Error):
n = int(input())
sp = []
for i in range(n):
  s, p = map(int,input().split())
  sp.append([s, int(p), i+1])
sp.sort(key=lambda x:x[1], reverse = True)
sp.sort(key=lambda x:x[0])
for e in sp:
  print(e[2])
Problem p02602 (python)

Fixed submission:
i = list(map(int,input().split()))
j = list(map(int,input().split()))
for p in range(0, i[0] - i[1]):
    if j[p] < j[p + i[1]]:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
i = list(map(int,input().split()))
j = list(map(int,input().split()))
for i in range(0, i[0] - i[1]):
    if j[i] < j[i + 3]:
        print("Yes")
    else:
        print("No")
Problem p02628 (python)

Fixed submission:
n = input()
m = n.split()

a = [input() for l in range(0,1)]
b = a[0].split()


for i in range(0, len(b)):
    b[i] = int(b[i])

c = sorted(b, reverse=True)

p = 0
for i in range(int(m[0]) - int(m[1]),int(m[0])):
    p = p + int(c[i])
print(int(p))

Buggy submission (verdict: Runtime Error):
import sys
def order (p):
    return (sorted(p))         
def Mix_Juice (p):
    p[1] = K
    a = order (p[2:])
    b = 0
    for i in range (0, K):
        b = b + a[i]
    return b
p = list(map(int, input().split()))
Mix_Juice (p)

Buggy submission (verdict: Runtime Error):
import sys
def order (p):
    return (sorted(p))         
def Mix_Juice (p):
    p[0] = len (p)
    p[1] = K
    a = order (p[2:p[0]])
    b = 0
    for i in range (0, K-1):
        b = b + a[i]
    return b
p = list(map(int, input().split()))
Mix_Juice (p)
Problem p02645 (python)

Fixed submission:
S = input()
print (S[0:3])

Buggy submission (verdict: Runtime Error):
def adana ('S'):
    return S[0:3]
Problem p02621 (python)

Fixed submission:
a = int(input())

b = int(a + a ** 2 + a ** 3)
print(b)

Buggy submission (verdict: Runtime Error):
a = int(input())
)
a = int(a ** 3)
print(a)
Problem p03455 (python)

Fixed submission:
a = input()
b = a.split(' ')
 
nummm = 1
 
for l in b:
    nummm = int(nummm) * int(l)
 
if int(nummm) % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a = input()
b = input()

c = int(a) * int(b)

if int(c) % 2:
    print('Even')
else :
    print('Odd')
Problem p03493 (python)

Fixed submission:
i = input()
a = i.count('1')

print(a)

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
*A, = map(int, input().split())
d = [0]*(N+1)
for a in A:
    d[a] += 1
    d.sort()
    d.reverse()
    print(sum(d[K:]))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
*A, = map(int, input().split())
d = [0]*(N+1)
for a in A:
    d[a] += 1
    d.sort()
    d.reverse()
    print(sum(d[K:]))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
*A, = map(int, input().split())
d = [0]*(N+1)
for a in A:
    d[a] += 1
    d.sort()
    d.reverse()

print(sum(d[K:]))
Problem p02969 (python)

Fixed submission:
def func():
    input_num = int(input(''))
    return 3*input_num**2


if __name__ == "__main__":
    print(func())

Buggy submission (verdict: Runtime Error):
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

Buggy submission (verdict: Runtime Error):
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

Buggy submission (verdict: Runtime Error):
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, [0]*input_num
    count = [1 for i in range(input_num) if a_i[0] == a_i[i]]
    frag = False if sum(count) >= 2 else True
    value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)] if frag == True else [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()

Buggy submission (verdict: Runtime Error):
def func():
    input_num = int(input(''))
    a_i = [int(input('')) for i in range(input_num) ]
    frag, count = True, 0
    for i in range(input_num):
        if a_i[0] == a_i[i]:
            count += 1
    if count == input_num:
         frag = False
    if frag == True:
        value = [[a_i[i] if a_i[i] != a_i[j] else 0 for i in range(input_num )] for j in range(input_num)]
    else:
        value = [[a_i[i]for i in range(input_num )] for j in range(input_num)]
    for i in range(input_num):
        print(max(value[i]))
if __name__ == '__main__':
    func()
Problem p02705 (python)

Fixed submission:
r  = int(input())
print(2 * 3.14 * r)

Buggy submission (verdict: Runtime Error):
import math

r  = int(input())
print(2 * math.PI * r)
Problem p04029 (python)

Fixed submission:
N = int(input())
ans = 0
 
for i in range(1,N+1):
  ans += i
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 1
for i in range(1,N+1):
  ans += ans+i
print(answer)
Problem p03029 (python)

Fixed submission:
import math

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

c=math.floor(int((3*aa+bb)/2))
print(c)

Buggy submission (verdict: Runtime Error):
a,b=input(),input()
aa=int(a)
bb=int(b)

c=int((3*aa+bb)/2)
print(c)
Problem p02957 (python)

Fixed submission:
a, b = map(int, input().split( ))
s = a + b
if s %2 ==1:
  print('IMPOSSIBLE')
else:
  print(s//2)

Buggy submission (verdict: Runtime Error):
from collections import deque
from bisect import bisect_left
S = input()
# dp[i][j]はうしろからi桁を13で割った余りがjであるものの個数
dp = [[0] * 13 for _ in range(len(S) + 1)]
dp[0][0] = 1
mul = 1
mod = 10**9 + 7

for i in range(len(S)):
  x = S[-(i+1)]
  if x == '?':
    for k in range(10):
      for j in range(13):
        dp[i+1][(mul*k+j)%13] += dp[i][j]
        dp[i+1][(mul*k+j)%13] %= mod
  else:
    k = int(x)
    for j in range(13):
      dp[i+1][(mul*k+j)%13] += dp[i][j]
      dp[i+1][(mul*k+j)%13] %= mod
  mul = mul*10 % 13  
print(dp[len(S)][5])

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split( ))
s = a + b
if s %2 ==1:
  print('IMPOSSIBLE')
else;
print(s//2)
Problem p03469 (python)

Fixed submission:
s = input()
print(s.replace('2017', '2018'))

Buggy submission (verdict: Runtime Error):
s = input()
print(s.replace(2017, 2018))
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int .input().split())
if (a*b) % 2:
  print("Odd")
else:
  print("Even")
Problem p02639 (python)

Fixed submission:
nums = list(map(int, input().split()))
index = 0
for i in nums:
    if nums[index] == 0:
        print(index+1)
    index += 1

Buggy submission (verdict: Runtime Error):
nums = list(map(int, input().split()))
ans = -1
for i in nums:
    if nums[i] == 0:
        print(i)
Problem p02608 (python)

Fixed submission:
# 
import sys

from sys import stdin
input = lambda: stdin.readline().rstrip()

N = int(input())

l = [0] * N
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            v = x**2+y**2+z**2+x*y+y*z+z*x
            if v <= N:
                l[v-1] = l[v-1] + 1

for i in l:
    print(i)

Buggy submission (verdict: Runtime Error):
# 
import sys

from sys import stdin
input = lambda: stdin.readline().rstrip()

N = int(input())

l = [0] * N
for x in range(1,100):
    for y in range(1,100):
        for z in range(1,100):
            v = x**2+y**2+z**2+x*y+y*z+z*x
            if v <= N:
                l[v-1] = l[v-1] + 1

import matplotlib.pyplot as plt

for i in l:
    print(i)
Problem p02639 (python)

Fixed submission:
from sys import stdin

#l = list(map(int, stdin.readline().rstrip().split()))
a,b,c,d,e = map(int, stdin.readline().rstrip().split())
#S = [list(map(int, stdin.readline().rstrip().split())) for _ in range(h)]#hの定義を忘れずに

if a==0:
  print('1')
elif b==0:
  print('2')
elif c==0:
  print('3')
elif d==0:
  print('4')
elif e==0:
  print('5')

Buggy submission (verdict: Runtime Error):
from sys import stdin

#l = list(map(int, stdin.readline().rstrip().split()))
a,b,c,d,e = map(int, stdin.readline().rstrip().split())
#S = [list(map(int, stdin.readline().rstrip().split())) for _ in range(h)]#hの定義を忘れずに

if a==0:
  print('1')
elif b==0:
  print('2')
elif c==0:
  pront('3')
elif d==0:
  print('4')
elif e==0:
  print('5')
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=int(input())
print(a*b)

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

Buggy submission (verdict: Runtime Error):
a,b=map(input().split())
print(a*b)
Problem p02675 (python)

Fixed submission:
n=int(input())
a=n%10
if a==2 or a==4 or a==5 or a==7 or a==9:
  print('hon')
elif a==0 or a==1 or a==6 or a==8:
  print('pon')
elif a==3:
  print('bon')

Buggy submission (verdict: Runtime Error):
n=int(input())
a=n%10
if a=2 or a=4 or a=5 or a=7 or a=9:
  print('hon')
elif a=0 or a=1 or a=6 or a=8:
  print('pon')
elif a=3:
  print('bon')
Problem p03059 (python)

Fixed submission:
a, b, t = map(int, input().split())
print(int((t+0.5)//a)*b)

Buggy submission (verdict: Runtime Error):
import sys
import os
import math
import itertools
import math
import fractions
from functools import reduce

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

n = int(input())
nums = [int(i) for i in input().split()]
gcds = []
for num in nums:
    tmp = nums.copy()
    tmp.remove(num)
    gcds.append(gcd(*tmp))
print(max(gcds))

Buggy submission (verdict: Runtime Error):
import sys
import os
import math
import itertools
import math
import fraction
from functools import reduce

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

n = int(input())
nums = [int(i) for i in input().split()]
gcds = []
for num in nums:
    tmp = nums.copy()
    tmp.remove(num)
    gcds.append(gcd(*tmp))
print(max(gcds))
Problem p03160 (python)

Fixed submission:
import math
import sys
# import os
# f = open('input.txt', 'r')
# sys.stdin = f

n = int(input())
h = list(input().split())
h = [int(i) for i in h]
dp = [100000]*n
dp[0] = 0
dp[1] = abs(h[1]-h[0])
for i in range(2, n):
    dp[i] = min(dp[i-1] + abs(h[i]-h[i-1]), dp[i-2] + abs(h[i]-h[i-2]))
print(dp[n-1])

Buggy submission (verdict: Runtime Error):
import math
# import sys
# import os
# f = open('input.txt', 'r')
# sys.stdin = f

n = int(input())
h = list(input().split())
h = [int(i) for i in h]
dp = [100000]*n
dp[0] = 0
dp[1] = h[1]-h[0]
for i in range(2, n):
    dp[i] = min(dp[i-1] + abs(h[i]-h[i-1], dp[i-2] + abs(h[i]-h[i-2]))

print(dp[n-1])
Problem p02645 (python)

Fixed submission:
S=str(input())

print(S[:3])

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

eva=False

pl=abs(B-A)
ve=V-W

if pl<=ve*T and 0<pl:
    if ve>0:
        eva=True
if eva:
    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())

eva=False

pl=abs(B-A)
ve=V-W

if pl<=ve*T and 0<pl:
    if ve>0:
        #if pl%abs(ve)==0:
            eva=True
if eva:
    print("YES")
else:
    print("NO")
Problem p02646 (python)

Fixed submission:
A,V=map(int,input().split())
B,W=map(int,input().split())
T=int(input())

eva=False

pl=abs(B-A)
ve=V-W

if pl<=ve*T:
    if ve>0:
        eva=True
if eva:
    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())

eva=False

pl=B-A
ve=V-W

if pl<=ve*T:
    if pl%ve==0:
        eva=True
if eva:
    print("YES")
else:
    print("NO")
Problem p02553 (python)

Fixed submission:
a,b,c,d = map(int, input().split())
m = a*c
n = a*d
o = b*c
p = b*d
if(m>n and m>o and m>p):
    print(m)
elif (n>m and n>o and n>p):
    print(n)
elif (o> m and o>n and o>p):
    print(o)
else:
    print(p)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, raw_input().split())
print(max(a*c,a*d,b*c,b*d))

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(raw_input().split())
m = a*c
n = a*d
o = b*c
p = b*d
if(m>n and m>o and m>p):
    print(m)
elif (n>m and n>o and n>p):
    print(n)
elif (o> m and o>n and o>p):
    print(o)
else:
    print(p)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, raw_input().split())
m = a*c
n = a*d
o = b*c
p = b*d
if(m>n and m>o and m>p):
    print(m)
elif (n>m and n>o and n>p):
    print(n)
elif (o> m and o>n and o>p):
    print(o)
else:
    print(p)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, raw_input().split())
m = a*c
n = a*d
o = b*c
p = b*d
if(m>n and m>o and m>p):
    print(m)
elif (n>m and n>o and n>p):
    print(n)
elif (o> m and o>n and o>p):
    print(o)
else:
    print(p)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int, raw_input().split())
m = a*c
n = a*d
o = b*c
p = b*d
if(m>n and m>o and m>p):
    print(m)
elif (n>m and n>o and n>p):
    print(n)
elif (o> m and o>n and o>p):
    print(o)
else:
    print(p)
Problem p02664 (python)

Fixed submission:
print(input().replace('?', 'D'))

Buggy submission (verdict: Runtime Error):
T = str(input()).upper()
for i in T:
    if i == 'P' or 'D' and i== '?':
        if i + 'D':
            print(T.replace('?','P'))
        else:
            print(T.replace('?','D'))
    else:
        break
Problem p02681 (python)

Fixed submission:
import string
S = str(input())
T = str(input())
li = []
for i in string.ascii_lowercase:
    H = S + i
    li.append(H)
print("Yes" if T in li else "No")

Buggy submission (verdict: Runtime Error):
S = str(input())
T = str(input())
li = []
for i in string.ascii_lowercase:
    H = S + i
    li.append(H)
if T in li:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S = str(input())
T = str(input())
li = []
for i in string.ascii_lowercase:
    H = S + i
    li.append(H)
if T in li:
    print("Yes")
else:
    print("No")