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

Fixed submission:
import math
N, K = map(int, input().split())
ans = 0
k = 1/N
for i in range(1, N+1):
    if K>i:
        ans +=(0.5)**math.ceil(math.log2(K/i))
    else:
        ans +=1
print(k*ans)

Buggy submission (verdict: Runtime Error):
import math
N, K = map(int, input().split())
ans = 0
k = 1/N
for i in range(1, N+1):
    if K>i:
        print(math.ceil(math.log2(K/i)))
        ans +=(0.5)**math.ceil(math.log2(K/i))
        print(ans)
    else:
        ans +=1
print(k*ans)
Problem p03106 (python)

Fixed submission:
a,b,k=map(int,input().split())
li=[]
for i in range(1,min(a,b)+1):
    if a%i==0 and b%i==0:
        li.append(i)
print(li[len(li)-k])

Buggy submission (verdict: Runtime Error):
import math
A, B, K = map(int, input().split())
num = math.gcd(A,B)
a = []
a.append(num)
for i in range(1,num):
    if num % i == 0:
        a.append(i)
b = sorted(a)
print(b[len(b)-K])

Buggy submission (verdict: Runtime Error):
import math
A, B, K = map(int, input().split())
num = math.gcd(A,B)
a = [num]
for i in range(1,num):
    if num % i == 0:
        a.append(i)
b = sorted(a)
print(b[len(b)-K])

Buggy submission (verdict: Runtime Error):
import math
A, B, K = map(int, input().split())
num = math.gcd(A,B)
a = [num]
for i in range(1,num):
    if num % i == 0:
        a.append(i)
b = sorted(a)
print(b[len(b)-K])

Buggy submission (verdict: Runtime Error):
import math
A, B, K = map(int, input().split())
num = int(math.gcd(A,B))
a = [num]
for i in range(1,num):
    if num % i == 0:
        a.append(i)
b = sorted(a)
print(b[len(b)-K])
Problem p03292 (python)

Fixed submission:
A= list(map(int, input().split()))
B= sorted(A)
print(B[2]-B[0])

Buggy submission (verdict: Runtime Error):
S=input()
T=input()
 
if S==T:
    ans="Yes"
else:
    ans="No"
    for _ in range(len(S)):
        rotated_S=S[len(S)-1:]+S[:len(S)-1]
        if rotated_S==T:
            ans="Yes"
            break
        else:
            S=rotated_S
print(ans)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
cnt = 0
s = S + S
for i in range(len(S)+1):
    if s[i]==T[0]:
        for j in range(len(T)):
            if s[i+j]==T[j]:
                cnt +=1
if cnt==len(T) or S == T:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
S = input()
T = input()
cnt = 0
s = S + S
for i in range(len(S)+1):
    if s[i]==T[0]:
        for j in range(len(T)):
            if s[i+j]==T[j]:
                cnt +=1
if cnt==len(T) or S == T:
    print('Yes')
else:
    print('No')
Problem p03408 (python)

Fixed submission:
import collections
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]
for i in range(M):
    if t[i] in s:
        s.remove(t[i])
if s ==list():
    print(0)
else:
    print(s.count(collections.Counter(s).most_common()[0][0]))

Buggy submission (verdict: Runtime Error):
import statistics
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]
for i in range(M):
    if t[i] in s:
        s.remove(t[i])
if s ==list():
    print(0)
else:
    print(s.count(statistics.mode(s)))
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())
a = -1
b = -1
c = -1

Y = Y//1000
for i in range(N+1):
    for j in range(N-i+1):
        if Y == i*9 + j*4 +N:
            a = i
            b = j
            c = N-i-j
            #print(a,b,c)
            break
        else:
            continue
        break
        
          
print(a, b, c , sep=(' '))

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())
x = False
Y = Y//1000
for i in range(N+1):
        for j in range(N-i+1):
                b = N - i
                c = N - i - j
                if a + b + c == N and Y == a*10 + b*5 +c:
                    x = True
                    break
        break
if x:
    print(a, b, c , sep=(' '))        
                    
else:
    print(-1, -1, -1, sep=(' '))
Problem p03556 (python)

Fixed submission:
import math
N=int(input())
n=math.sqrt(N)
 
print(int(n)**2)

Buggy submission (verdict: Runtime Error):
N = int(input())
L = []
for i in range(int(N/2)):
    if i**2<=N:
        L.append(i**2)
print(max(L))
Problem p03644 (python)

Fixed submission:
N = int(input())
a = [1, 2, 4, 8, 16, 32, 64]
b = []
for i in range(len(a)):
    if a[i]<=N:
        b.append(a[i])
print(max(b))

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
a = [1, 2, 4, 8, 16, 32, 64]
b = []
for i in range(len(a)):
    if a[i]<=N:
        b.append(a[i])
print(max(b))
Problem p03059 (python)

Fixed submission:
a, b, t = (int(i) for i in input().split())
 
times = int(t / a)
 
num = times * b
 
print(num)

Buggy submission (verdict: Runtime Error):
a, b, t = (int(i) for i in input())

times = int(t / a)

num = times * b

print(num)
Problem p03060 (python)

Fixed submission:
n = int(input())
V = [int(v) for v in input().split()]
C = [int(c) for c in input().split()]

G = [v - c for v, c in zip(V, C)]

s = 0
for g in G:
    if g > 0:
        s += g

print(s)

Buggy submission (verdict: Runtime Error):
n = int(input())
V = [int(v) for v in input().split]
C = [int(c) for c in input().split]

G = [v - c for v, c in zip(V, C)]

s = 0
for g in G:
    if g > 0:
        s += g

print(s)
Problem p03068 (python)

Fixed submission:
in_data = [input() for i in range(3)] 
 
n = int(in_data[0])
s = in_data[1]
k = int(in_data[2])





target_c = s[k - 1]
new_s = ''
for c in s:
    if c == target_c:
        new_s += c
    else:
        new_s += '*'
 
print(new_s)

Buggy submission (verdict: Runtime Error):
in_data = [input() for i in range(3)] 
 
n = int(in_data[0])
s = in_data[1]
k = int(in_data[2])




target_c = s[k]
new_s = ''
for c in s:
    if c == target_c:
        new_s += c
    else:
        new_s += '*'
 
print(new_s)

Buggy submission (verdict: Runtime Error):
n, s, k = (int(i) for i in input().split())  


target_c = s[k]
new_s = ''
for c in s:
    if c == target_c:
        new_s += c
    else:
        new_s += '*'

print(new_s)
Problem p02646 (python)

Fixed submission:
a,v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
 
if(w>=v):
  print("NO")
elif(abs(b-a)/(v-w) > t):
  print("NO")
else:
  print("YES")

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

if(w>=v):
  print("NO")
else if(abs(b-a)/(v-w) > t):
  print("NO")
else:
  print("YES")
Problem p03399 (python)

Fixed submission:
train_normal = int(input())
train_unlimited = int(input())
bus_normal = int(input())
bus_unlimited = int(input())
train = min(train_normal, train_unlimited)
bus = min(bus_normal, bus_unlimited)
total = train + bus
print(total)

Buggy submission (verdict: Runtime Error):
train_normal = input()
train_unlimited = input()
bus_normal = input()
bus_unlimited = input()
train_normal = input()
train = min(train_normal, train_unlimited)
bus = min(bus_normal, bus_unlimited)
total = train + bus
print(total)

Buggy submission (verdict: Runtime Error):
i = input()
train = min(i[0], i[1])
bus = min(i[2], i[3])
total = train + bus
print(total)

Buggy submission (verdict: Runtime Error):
input = input()
train = max(input[0], input[1])
bus = max(input[2], input[3])
total = train + bus
print(total)
Problem p03400 (python)

Fixed submission:
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    j = int(input())
    k = divmod(D-1,j)
    A.append(1 + k[0])

total = X + sum(A)
print(total)

Buggy submission (verdict: Runtime Error):
N = int(input())
D, X = map(int, input().split())
A = []
for i in range(N):
    j = int(input())
	k = divmod(D-1,j)
	A.append(1 + k[0])

total = X + sum(A)
print(total)
Problem p03401 (python)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A.append(0)
    
total_normal = 0
prev = 0
for a in A:
    length = abs(a-prev)
    total_normal += length
    prev = a

prev = 0
for i in range(N):
    now = A[i]
    nex = A[i + 1]
    ans = total_normal - (abs(now - prev) + abs (nex - now)) + abs(nex - prev)
    print(ans)
    prev = now

Buggy submission (verdict: Runtime Error):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))

A.append(0)
    
total_normal = 0
prev = 0
for a in A:
    length = abs(a-prev)
    total_normal += length
    prev = a

prev = 0
for i in range(N):
    now = A[i]
    nex = A[i + 1]
    ans = total_normal - (abs(now - prev) + abs (nex - now)) + abs(nex - prev)
    print(ans)
    prev = now
Problem p02767 (python)

Fixed submission:
n = int(input())
list_ = list(map(int,input().split()))
min_ = min(list_)
max_ = max(list_)
num=[]
for a in range(min_,max_):
  _ = []
  for b in range(len(list_)):
    _.append((a - list_[b])**2)
  num.append(sum(_))
if len(list(set(list_))) == 1:
  print(0)
  exit()
print(min(num))

Buggy submission (verdict: Runtime Error):
n = int(input())
list = list(map(int,input().split()))
min_ = min(list)
max_ = max(list)
num=[]
for a in range(min_,max_):
  _ = []
  for b in range(len(list)):
    _.append((a - list[b])**2)
  num.append(sum(_))
if n == 1:
  print(0)
  exit()
print(min(num))

Buggy submission (verdict: Runtime Error):
n = int(input())
list = list(map(int,input().split()))
min_ = min(list)
max_ = max(list)
num=[]
for a in range(min_,max_):
  _ = []
  for b in range(len(list)):
    _.append((a - list[b])**2)
  num.append(sum(_))
print(min(num))
Problem p02612 (python)

Fixed submission:
N = int(input())
answer = 0
for i in range(1, 1000):
  pay = 1000 * i
  if pay >= N:
    answer = pay - N
    break
print(answer)

Buggy submission (verdict: Runtime Error):
N = input()
answer = N % 1000
print(answer)
Problem p02647 (python)

Fixed submission:
import sys
import numpy as np
from numba import njit

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

@njit('(i8[::1],)', cache=True)
def update(A):
    N = len(A)
    B = np.zeros_like(A)
    for i, x in enumerate(A):
        l = max(0, i - x)
        r = min(N - 1, i + x)
        B[l] += 1
        if r + 1 < N:
            B[r + 1] -= 1
    B = np.cumsum(B)
    return B

N, K = map(int, readline().split())
A = np.array(read().split(), np.int64)

K = min(K, 100)
for _ in range(K):
    A = update(A)
print(' '.join(A.astype(str)))

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

@njit('i8,i8,i8[::1]', cache=True)
def fn(N, K, A):
    for _ in range(0, min(42, K)):
        B = np.zeros(N, dtype=np.int64)
        for i in range(N):
            l = max(0, i - A[i])
            r = min(N - 1, i + A[i])
            B[l] += 1
            if (r + 1 < N):
                B[r + 1] -= 1
        A = np.cumsum(B)
        if (np.all(A == N)):
            break;

N, K = map(int, input().split())
A = list(map(int, input().split()))
A = np.array(A, dtype=np.int64)
A = fn(N, K, A)
print(" ".join([str(item) for item in A]))

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

@njit('i8,i8,i8[::1]', cache=True)
def update(A, N):
    B = [0] * N
    for i, t in enumerate(A):
        l = max(0, i - t)
        r = min(N - 1, i + t)
        B[l] += 1
        if (r + 1 < N):
            B[r + 1] -= 1
    return np.cumsum(B)

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    for _ in range(0, min(42, K)):
        A = update(A, N)
    print(" ".join([str(item) for item in A]))

if __name__ == "__main__":
    main()

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

@njit(cache=True)
def update(A, N):
    B = [0] * N
    for i in range(0, N):
        l = max(0, i - A[i])
        r = min(N - 1, i + A[i])
        B[l] += 1
        if (r + 1 < N):
            B[r + 1] -= 1
    return np.cumsum(B)

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    for _ in range(0, min(100, K)):
        A = update(A, N)
    print(" ".join([str(item) for item in A]))

if __name__ == "__main__":
    main()
Problem p02747 (python)

Fixed submission:
s = input()
if s.replace('hi','') == '':
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
import numpy as np
a,b,m = [int(i) for i in input().split()]
aa = [int(i) for i in input().split()]
bb = [int(i) for i in input().split()]
x = np.zeros(m,dtype=int)
y = np.zeros(m,dtype=int)
c = np.zeros(m,dtype=int)
for i in range(m):
    x[i],y[i],c[i] = [int(j) for j in input().split()]
r = np.zeros((a,b),dtype=int)
for i in range(a):
    for j in range(b):
        r[i][j] = aa[i] + bb[j]
v = np.min(r)
for i,j,l in zip(x,y,c):
    if v > r[i-1][j-1] - l:
        v = r[i-1][j-1] - l
print(v)

Buggy submission (verdict: Runtime Error):
s = input()
if s.replace('hi','') == '':
    print('Yes')
else
    print('No')
Problem p02765 (python)

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

if n >= 10:
    print(r)
else:
    print(r + (100 * (10 - n)))

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

n = int(input())
x = np.array(list(map(int,input().split())))
# x = np.array(x)
r = np.full(100, 100 * n)

for p in range(100):
    r[p] = np.sum((x - p + 1)**2)
print(np.min(r))
Problem p03473 (python)

Fixed submission:
m = int(input())
print(48 - m)

Buggy submission (verdict: Runtime Error):
m = input()
print(48 - m)
Problem p02657 (python)

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

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

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
mul = a*b
print(mul)
Problem p02717 (python)

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

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

temp = a
a = c
c = b
b = temp 

print(a,b,c)

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

a = a + b + c    
b = a - (b+c)    
c = a - (b+c) 
a = a - (b+c) 
print(a,b,c)

Buggy submission (verdict: Runtime Error):
def swapThree(a, b, c):  
    a = a + b + c  
   
    b = a - (b+c) 
   
    c = a - (b+c) 
   
    a = a - (b+c) 
      
    print("After swapping a =",a,", b =",b,", c =",c) 
  
if __name__ == '__main__': 
    a = int(input())
    b = int(input())
    c = int(input())
  
    print("Before swapping a =",a,", b =",b,", c =",c) 
  
    swapThree(a, b, c)
Problem p02921 (python)

Fixed submission:
S = input()
T = input()

ans = 0
for i in range(3):
    ans += 1 if S[i] == T[i] else 0

print(ans)

Buggy submission (verdict: Runtime Error):
SSR
SSR
Problem p02602 (python)

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

for i in range(k, n+1):
    if i == k:
        continue
    print('Yes' if a[i-k-1] < a[i-1] else 'No')

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

n, k = map(int, input().split())
a = list(map(int, input().split()))
score = [0] * (n+1)

for i in range(k, n+1):
    score[i] = np.prod(a[i-k:i])

for i in range(k+1, n+1):
    print('Yes' if score[i-1] < score[i] else 'No')
Problem p02603 (python)

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

money = 1000

for i in range(n-1):
    stock = 0
    if a[i] < a[i+1]:
        stock = money // a[i]
    money += (a[i+1] - a[i]) * stock

print(money)

Buggy submission (verdict: Runtime Error):
money = 1000
stock = 0
leave_max = max(a[1:])

for i in range(n):
    if i == n-1:
        if stock != 0:
            money += a[i] * stock
        break

    leave_max = max(a[i+1:])

    if a[i] >= a[i+1]:
        if stock != 0:
            money += a[i] * stock
            stock = 0

        if a[i] > leave_max:
            break
        else:
            continue

    elif a[i] < a[i+1]:
        num = money // a[i]
        if num != 0:
            stock += num
            money -= stock * a[i]

print(money)
Problem p02608 (python)

Fixed submission:
n = int(input())
ans = [0 for _ in range(n+1)]
def calc(n):
    for x in range(1, int(n**0.5)+1):
        for y in range(1, int(n**0.5)+1):
            for z in range(1, int(n**0.5)+1):
                v = x**2 + y**2 + z**2 + x*y + y*z + z*x
                if v < n+1:
                    ans[v] += 1

calc(n)
for i in range(n):
    print(ans[i+1])

Buggy submission (verdict: Runtime Error):
from math import sqrt

n = int(input())
 
def calc(n):
    if n < 6:
        return 0
    if n == 6:
        return 1
    if 6 < n < 11:
        return 0
    if n == 11:
        return 3
    if 11 < n < 17:
        return 0
    if n == 17:
        return 3
    if n == 18:
        return 3
    ans = 0
    for x in range(1, sqrt(n)//1):
        for y in range(1, sqrt(n)//1):
            for z in range(1, sqrt(n)//1):
                if x**2 + y**2 + z**2 + x*y + y*z + z*x == n:
                    ans += 1
 
    return ans
 
for i in range(1, n+1):
    print(calc(i))
Problem p03160 (python)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))
res = [0] * n

res[1] = abs(h[1] - h[0])
for i in range(2, n):
    res[i] = min(res[i-2] + abs(h[i] - h[i-2]),
                 res[i-1] + abs(h[i] - h[i-1]))

print(res[-1])

Buggy submission (verdict: Runtime Error):
from functools import lru_cache
import sys
sys.setrecursionlimit(50000)

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

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

print(rec(n-1))

Buggy submission (verdict: Runtime Error):
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)

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

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

print(rec(n-1))

Buggy submission (verdict: Runtime Error):
from functools import lru_cache
import sys
sys.setrecursionlimit(2000)

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

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

print(rec(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 rec(n):
    if n == 0:
        return 0
    elif n == 1:
        return abs(h[1]-h[0])
    return min(abs(h[n]-h[n-1]) + rec(n-1), abs(h[n]-h[n-2]) + rec(n-2))

print(rec(n-1))
Problem p02601 (python)

Fixed submission:
[a, b, c] = [int(x) for x in input().split(" ")]
k = int(input())
a_b_flg = False if a >= b else True
b_c_flg = False if b >= c else True

for kdx in range(0, k):
  if not a_b_flg:
    b = b*2
  elif not b_c_flg:
    c = c*2
  a_b_flg = False if a >= b else True
  b_c_flg = False if b >= c else True
  if a_b_flg and b_c_flg:
    print('Yes')
    break
if not (a_b_flg and b_c_flg):
  print('No')

Buggy submission (verdict: Runtime Error):
[a, b, c] = [int(x) for x in input().split(" ")]
k = int(input())
a_b_flg = False if a >= b else True
b_c_flg = False if b >= c else True

for kdx in range(0, k):
  if not a_b_flg:
    b = b*2
  elif not b_c_flg:
    c = c*2
  a_b_flg = False if a >= b else True
  b_c_flg = False if b >= c else True
  if a_b_flgw and b_c_flg:
    print('Yes')
    break
if not (a_b_flgw and b_c_flg):
  print('No')

Buggy submission (verdict: Runtime Error):
[a, b, c] = [int(x) for x in input().split()]
k = int(input())
a_b_flg = False if a >= b else True
b_c_flg = False if b >= c else True

for kdx in range(0, k):
  if not a_b_flg:
    b = b*2
  elif not b_c_flg:
    c = c*2
  a_b_flg = False if a >= b else True
  b_c_flg = False if b >= c else True
  if a_b_flgw and b_c_flg:
    print('Yes')
    break
if not (a_b_flgw and b_c_flg):
  print('No')

Buggy submission (verdict: Runtime Error):
[a, b, c] = [x for x in map(int, input().split())]
k = int(input())
a_b_flg = False if a >= b else True
b_c_flg = False if b >= c else True

for kdx in range(0, k):
  if not a_b_flg:
    b = b*2
  elif not b_c_flg:
    c = c*2
  a_b_flg = False if a >= b else True
  b_c_flg = False if b >= c else True
  if a_b_flgw and b_c_flg:
    print('Yes')
    break
if not (a_b_flgw and b_c_flg):
  print('No')

Buggy submission (verdict: Runtime Error):
[a, b, c] = [x for x in map(int, input().split(' '))]
k = int(input())
a_b_flg = False if a >= b else True
b_c_flg = False if b >= c else True

for kdx in range(0, k):
  if not a_b_flg:
    b = b*2
  elif not b_c_flg:
    c = c*2
  a_b_flg = False if a >= b else True
  b_c_flg = False if b >= c else True
  if a_b_flgw and b_c_flg:
    print('Yes')
    break
if not (a_b_flgw and b_c_flg):
  print('No')
Problem p02639 (python)

Fixed submission:
x = [x for x in map(int, input().split(' '))]
for i in range(0, len(x)):
  if x[i] == 0:
    print(i+1)
    break

Buggy submission (verdict: Runtime Error):
x = map(int, input().split(' '))
for i in range(0, len(x)):
  if x[i] == 0:
    print(i+1)
    break
Problem p02640 (python)

Fixed submission:
[x, y] = [x for x in map(int, input().split(' '))]
flg = -1
if y % 2 == 1:
  flg = 1
else:
  for i in range(0, x):
    if i * 2 + (x - i) * 4 == y or (x - i) * 2 + i * 4 == y:
      flg = 0
      break
print('Yes' if flg == 0 else 'No')

Buggy submission (verdict: Runtime Error):
[x, y] = [x forx in map(int, input().split(' '))]
flg = -1
if y % 2 == 1:
  flg = 1
else:
  for i in range(0, x):
    if i * 2 + (x - i) * 4 == y:
      flg = 0
      break
if flg == 1 or flg == -1:
  print('No')
else:
  print('Yes')
Problem p02677 (python)

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

long_n = math.radians(h * 30 + 30 * (m / 60))
short_n = math.radians(360 / 60 * m)
 
y1 = a * math.sin(long_n)
x1 = a * math.cos(long_n)
 
y2 = b * math.sin(short_n)
x2 = b * math.cos(short_n)
 
print(math.sqrt((x2 - x1) **2+ (y2 - y1) **2))

Buggy submission (verdict: Runtime Error):
[a, b, h, m] = map(int, input())
 
import math
 
long_n = math.radians((h*60 + m) / (12 * 60))
short_n = math.radians((m) / 60)
 
y1 = a * math.sin(long_n)
x1 = a * math.cos(long_n)
 
y2 = b * math.sin(short_n)
x2 = b * math.cos(short_n)
 
print(math.sqrt((x2 - x1) **2+ (y2 - y1) **2))

Buggy submission (verdict: Runtime Error):
[a, b, h, m] = map(int, input())

import math

long_n = math.radians((h*60 + m) / (12 * 6o))
short_n = math.radians((m) / 60)

y1 = a * math.sin(long_n)
x1 = a * math.cos(long_n)

y2 = b * math.sin(short_n)
x2 = b * math.cos(short_n)

print(math.sqrt((x2 - x1) **2+ (y2 - y1) **2))
Problem p02999 (python)

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

Buggy submission (verdict: Runtime Error):
import sys
for e in sys.stdin.readline():
    X, A = map(int, e.split())
    print(0 if X < A else 10)

Buggy submission (verdict: Runtime Error):
X, A = map(int, input.split())
print(0 if X < A else 0)

Buggy submission (verdict: Runtime Error):
N = int(input())
return 0 if N[0] < N[1] else 10

Buggy submission (verdict: Runtime Error):
return (0 if  X < A else 10)

Buggy submission (verdict: Runtime Error):
0 if X < A else 10