Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
L = []
for i in range(5):
    L.append(int(input()))

ans = 0
tmp = []

for i in range(len(L)):
    if(L[i]%10 == 0):
        ans += L[i]
    else:
        ans += L[i] + (10 - L[i]%10)
        tmp.append(L[i]%10)

ans -= 10 - min(tmp)

print(ans)


Fixed submission:
L = []
for i in range(5):
    L.append(int(input()))

ans = 0
tmp = []

for i in range(len(L)):
    if(L[i]%10 == 0):
        ans += L[i]
    else:
        ans += L[i] + (10 - L[i]%10)
        tmp.append(L[i]%10)

if(len(tmp) > 0):
    ans -= 10 - min(tmp)

print(ans)

Buggy python submission (verdict: Runtime Error):
L = []
for i in range(5):
    L.append(int(input()))

ans = 0
tmp = []

for i in range(len(L)):
    if(L[i]%10 == 0):
        ans += L[i]
    else:
        ans += L[i] + (10 - L[i]%10)
        tmp.append(L[i]%10)

ans -= min(tmp)

print(ans)


Fixed submission:
L = []
for i in range(5):
    L.append(int(input()))

ans = 0
tmp = []

for i in range(len(L)):
    if(L[i]%10 == 0):
        ans += L[i]
    else:
        ans += L[i] + (10 - L[i]%10)
        tmp.append(L[i]%10)

if(len(tmp) > 0):
    ans -= 10 - min(tmp)

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

tmp = []

for i in range(1,A):
    if((A % i == 0) and (B%i==0)):
        tmp.append(i)

tmp.reverse()
print(tmp[K-1])


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

tmp = []

for i in range(1,max(A,B)+1):
    if((A % i == 0) and (B%i==0)):
        tmp.append(i)

tmp.reverse()
#print(tmp)
print(tmp[K-1])
Buggy python submission (verdict: Runtime Error):
N = int(input())
L = list(map(int,input().split()))

M = L.pop(max(L))

if(M < sum(L)):
    print('Yes')
else:
    print('No')

Fixed submission:
N = int(input())
L = list(map(int,input().split()))

M = max(L)

if(M < sum(L)-M):
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N, i = map(int, input().split())

print(N-(i-1)

Fixed submission:
N, i = map(int, input().split())

print(N-(i-1))

Buggy python submission (verdict: Runtime Error):
N, i = map(int, input().split())

print(N-(i-1)




Fixed submission:
N, i = map(int, input().split())

print(N-(i-1))
Buggy python submission (verdict: Runtime Error):
A,B,X = map(int,input())


if(A<=X and X-A <= B):
    print('YES')
else:
    print('NO')

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


if(A<=X and X-A <= B):
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
a,b = map(int,input().split())

if((a+b)%2 == 1):
    print((a+b)//2+1)
else:
    print((a+b)//)

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

if((a+b)%2 == 1):
    print((a+b)//2+1)
else:
    print((a+b)//2)
Buggy python submission (verdict: Runtime Error):
N,A,B = map(int,input().split())

if(A*T > B):
    print(B)
else:
    print(A*T)

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

if(A*T > B):
    print(B)
else:
    print(A*T)
Buggy python submission (verdict: Runtime Error):
s = input()

if(s[1]==s[2]):
    if(s[1]==s[4] or s[1]==s[0]):
        print('Yes')
    else:
        print('No')
else:
    print('No')

Fixed submission:
s = input()

if(s[1]==s[2]):
    if(s[1]==s[3] or s[1]==s[0]):
        print('Yes')
    else:
        print('No')
else:
    print('No')

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

if(s[1]==a[2]):
    print('Yes')
else:
    print('No')

Fixed submission:
s = input()

if(s[1]==s[2]):
    if(s[1]==s[3] or s[1]==s[0]):
        print('Yes')
    else:
        print('No')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())

print((N*(N+1)//2)

Fixed submission:
N = int(input())

print((N*(N+1)//2))
Buggy python submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
/* TLEだった orz 
int main() {
  ll N; cin >> N;
  ll val = 357, cnt = 0;
  while (N >= val) {
    string s = to_string(val);
    bool three=false,five=false,seven=false,ok=true;
    for(int i=0; i < s.size(); i++) {
      if(s[i]=='3')three=true;
      else if(s[i]=='5')five=true;
      else if(s[i]=='7')seven=true;
      else ok = false;
    }
    if(three&&five&&seven&&ok){
      cnt++;
      //cout<<"s = "<<s<<endl;
      //printf("cnt=%d\n",cnt);
    }
    val++;
  }
  cout << cnt << endl;
} 
*/
int N, ans;
void dfs(ll x,bool flag3,bool flag5,bool flag7) {
    if(x > N) {
        return ;
    }
    if(flag3 && flag5 && flag7) {
        ans++;
    }
    dfs(x*10+3, true, flag5, flag7);
    dfs(x*10+5, flag3, true, flag7);
    dfs(x*10+7, flag3, flag5, true);
}
int main() {
    cin >> N;
    dfs(0,0,0,0);
    cout << ans << endl;
}

Fixed submission:
N = int(input())

def dfs(s):
    if int (s) > N:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s+c)
    return ret

print(dfs('0'))
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
nums = list(map(int, input().split()))

sum_K = [sum(nums[i:i+K]) \
        for i in range(len(nums)-K+1)]
        
print((max(sum_K)+K)/2)

Fixed submission:
N,K = map(int, input().split())
nums = list(map(int, input().split()))

sum_K = [0]*(N-K+1)
sum_K[0] = sum(nums[:K])
for pos in range(1,N-K+1):
    sum_K[pos] = sum_K[pos-1] -   \
        nums[pos-1] + nums[pos+K-1]

print((max(sum_K)+K)/2)
Buggy python submission (verdict: Runtime Error):
n, m, c = map(int, input().split())
b = list(map(int, input().split()))

count = 0
for i in range(0, n):
    a = list(map(int, input().split()))
    s = 0
    for j in range(0, m):
        s += a[j] * b[j]
    if s + c > 0:
        count += 1
print(count)


Fixed submission:
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H - h) * (W - w))

Buggy python submission (verdict: Runtime Error):
H, W, h, w = map(int, input().split())
print((H - h) * (W - w))


Fixed submission:
H, W = map(int, input().split())
h, w = map(int, input().split())
print((H - h) * (W - w))
Buggy python submission (verdict: Runtime Error):
n = int(input())

max_index = 0
max_price = 0
price_list = []

for i in range(0, n + 1):
    p = int(input())
    price_list.append(p)
    if max_price < p:
        max_index = i

sum = 0
for i, p in enumerate(price_list):
    if i == max_index:
        sum += p / 2
    else:
        sum += p

print(sum)


Fixed submission:
n = int(input())

max_index = 0
max_price = 0
price_list = []

for i in range(0, n):
    p = int(input())
    price_list.append(p)
    if max_price < p:
        max_price = p
        max_index = i

p_sum = 0
for i, p in enumerate(price_list):
    if i == max_index:
        p_sum += p / 2
    else:
        p_sum += p

print(int(p_sum))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input())
print('Yay' if a <= 8 and b <= 8 else ':(')


Fixed submission:
a, b = map(int, input().split())
print('Yay!' if a <= 8 and b <= 8 else ':(')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

ans_tmp = 1
for i in range(1, n + 1):
    ans_tmp *= i

print(ans_tmp % (10 ** 9 + 7))


Fixed submission:
n = int(input())

d = 10 ** 9 + 7
ans = 1
for i in range(1, n + 1):
    ans = ans * i % d

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())


def calc_yz(target, limit):
    yz_list = []
    for y in range(limit + 1):
        z = target - y
        if 0 <= z <= limit:
            yz_list.append([y, z])
    return yz_list


def calc_xyz(target, limit):
    xyz_list = []
    for x in range(limit + 1):
        yz_sum = target - x
        if yz_sum < 0:
            continue
        yz_list = calc_yz(yz_sum, limit)
        for yz in yz_list:
            xyz_list.append([x] + yz)
    return xyz_list


print(len(calc_xyz(s, min(s, k))))


Fixed submission:
k, s = map(int, input().split())


def calc_xyz(target, limit):
    cnt = 0
    for x in range(min(limit, target) + 1):
        yz_sum = target - x
        for y in range(min(limit, yz_sum) + 1):
            if 0 <= target - x - y <= limit:
                cnt += 1
    return cnt


print(calc_xyz(s, k))

Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())


def calc_yz(target, limit):
    yz_list = []
    for y in range(limit + 1):
        z = target - y
        if 0 <= z <= limit:
            yz_list.append([y, z])
    return yz_list


def calc_xyz(target, limit):
    xyz_list = []
    for x in range(limit + 1):
        yz_sum = target - x
        if yz_sum < 0:
            continue
        yz_list = calc_yz(yz_sum, limit)
        for yz in yz_list:
            xyz_list.append([x] + yz)
    return xyz_list


print(len(calc_xyz(s, k)))


Fixed submission:
k, s = map(int, input().split())


def calc_xyz(target, limit):
    cnt = 0
    for x in range(min(limit, target) + 1):
        yz_sum = target - x
        for y in range(min(limit, yz_sum) + 1):
            if 0 <= target - x - y <= limit:
                cnt += 1
    return cnt


print(calc_xyz(s, k))
Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-
def main():
    unko = raw_input()
    unko_ans = 0
    for i in range(3):
        if unko[i] == '1':
            unko_ans = unko_ans + 1
    print(unko_ans)
if __name__ == "__main__":
    main()

Fixed submission:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
def main():
    unko = raw_input()
    unko_ans = 0
    for i in range(3):
        if unko[i] == '1':
            unko_ans = unko_ans + 1
    print(unko_ans)
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
s = input()
if s[0] == s[1] and s[1] = s[2] and s[2] == s[0]:
  print("No")
  exit()
  
print("Yes")

Fixed submission:
s = input()
if s[0] == s[1] and s[1] == s[2] and s[2] == s[0]:
  print("No")
  exit()
  
print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
s = str(input())
n = int(input())

for _ in range(n):
    q = input()

    # 反転の場合
    if q[0] == "1":
        s = s[::-1]
        continue

    # q = q.split()

    if q[2] == "1":
        s = q[4] + s

    if q[2] == "2":
        s = s + q[4]

print(s)


Fixed submission:
s = str(input())
n = int(input())

stat = 0
front = ""
back = ""

for _ in range(n):
    q = input()

    # 反転の場合
    if q[0] == "1":
        stat = (stat + 1) % 2
        continue

    judge = int(q[2])
    if stat == 1:
        if judge == 1:
            judge = 2
        elif judge == 2:
            judge = 1

    if judge == 1:
        front = q[4] + front 

    if judge == 2:
        back = back + q[4]

s = front + s + back
if stat == 1:
    s = s[::-1]

print(s)

Buggy python submission (verdict: Time Limit Exceeded):
s = str(input())
n = int(input())

for _ in range(n):
    q = input()

    # 反転の場合
    if q[0] == "1":
        s = s[::-1]
        continue

    q = q.split()

    if q[1] == "1":
        s = q[2] + s

    if q[1] == "2":
        s = s + q[2]

print(s)


Fixed submission:
s = str(input())
n = int(input())

stat = 0
front = ""
back = ""

for _ in range(n):
    q = input()

    # 反転の場合
    if q[0] == "1":
        stat = (stat + 1) % 2
        continue

    judge = int(q[2])
    if stat == 1:
        if judge == 1:
            judge = 2
        elif judge == 2:
            judge = 1

    if judge == 1:
        front = q[4] + front 

    if judge == 2:
        back = back + q[4]

s = front + s + back
if stat == 1:
    s = s[::-1]

print(s)
Buggy python submission (verdict: Runtime Error):
n, r = map(int, input().split())
 
if n < 10:
	print(r + 100*(10-k))
else:
    print(r)

Fixed submission:
n, r = map(int, input().split())
 
if n < 10:
	print(r + 100*(10-n))
else:
    print(r)
Buggy python submission (verdict: Runtime Error):
n = int(input())
list_x = list(map(int, input().split()))

#iが座標の位置

list_ans = []

for i in range(min(list_x), max(list_x)):
    
    #計算する
    ans = 0
    for j in list_x:
        ans += (i-j)**2

    list_ans.append(ans)

print(min(list_ans))

Fixed submission:
n = int(input())
list_x = list(map(int, input().split()))
 
#iが座標の位置
 
list_ans = []
 
for i in range(min(list_x), max(list_x)+1):
    
    #計算する
    ans = 0
    for j in list_x:
        ans += (i-j)**2
 
    list_ans.append(ans)
  
print(min(list_ans))
Buggy python submission (verdict: Runtime Error):
a, b, c = input()

if len(set([a, b, c])) == 2:
  print("yes")
else:
  print("No")

Fixed submission:
a, b, c = input().split()
 
if len(set([a, b, c])) == 2:
  print("Yes")
else:
  print("No")

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

if len(set(a, b, c)) == 2:
  print("yes")
else:
  print("No")

Fixed submission:
a, b, c = input().split()
 
if len(set([a, b, c])) == 2:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
list_n = []
for i in range(n):
    list_n.append(int(input()))

if len(list_n) == len(set(list_n)):
    print("YES")
else:
    print("NO")

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

if len(list_n) == len(set(list_n)):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
from operator import itemgetter
n = int(input())

list_p = []
for i in range(1, n):

    j = n / i

    if j.is_integer():
        list_p.append([i, j, i+j])
list_sorted = sorted(list_p, key=itemgetter(2))
print(int(list_sorted[0][0] + list_sorted[0][1] - 2))

Fixed submission:
from operator import itemgetter
n = int(input())

list_p = []
for i in range(1, int(n**0.5)+1):

    j = n / i

    if j.is_integer():
        list_p.append([i, j, i+j])

list_sorted = sorted(list_p, key=itemgetter(2))
print(int(list_sorted[0][0] + list_sorted[0][1] - 2))

Buggy python submission (verdict: Runtime Error):
from operator import itemgetter
n = int(input())

list_p = []
for i in range(n):
    for j in range(n - i):
        if i*j == 100:
            list_p.append([i, j, i+j])
list_sorted = sorted(list_p, key=itemgetter(2))
print(list_sorted[0][0] + list_sorted[0][1] - 2)

Fixed submission:
from operator import itemgetter
n = int(input())

list_p = []
for i in range(1, int(n**0.5)+1):

    j = n / i

    if j.is_integer():
        list_p.append([i, j, i+j])

list_sorted = sorted(list_p, key=itemgetter(2))
print(int(list_sorted[0][0] + list_sorted[0][1] - 2))
Buggy python submission (verdict: Time Limit Exceeded):
n, k, q = map(int, input().split())

list_A = []

for _ in range(q):
    i = int(input())
    list_A.append(i)

list_per = [k]*n

for i in list_A:
    i = i -1
    list_per = [x-1 for x in list_per]
    list_per[i] = list_per[i] + 1

for i in list_per:
    if i <=0:
        print("No")

    else:
        print("Yes")


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

list_A = []

for _ in range(q):
    i = int(input())
    list_A.append(i)

list_per = [0]*n

for i in list_A:
    i = i - 1
    list_per[i] = list_per[i] + 1

for i in list_per:
    if k - q + i > 0:
        print("Yes")

    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
list_A = list(map(int, input().split()))

for i in range(m):
    if list_A[-2] > list_A[-1]:
        list_A = sorted(list_A)
    list_A[-1] = int(list_A[-1]/2)

            # print(i, j, list_A[j])

print(sum(list_A))

Fixed submission:
import heapq as hp
n, m = map(int, input().split())
list_A = list(map(int, input().split()))
# list_A = sorted(list_A)

a_q = []
for i in list_A:
    hp.heappush(a_q, -1*i)

for i in range(m):
    tmp = hp.heappop(a_q)
    tmp = hp.heappush(a_q, int(tmp/2))

print(-sum(a_q))

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
list_A = list(map(int, input().split()))

for i in range(m):
    list_A = sorted(list_A)
    list_A[-1] = int(list_A[-1]/2)

            # print(i, j, list_A[j])

print(sum(list_A))

Fixed submission:
import heapq as hp
n, m = map(int, input().split())
list_A = list(map(int, input().split()))
# list_A = sorted(list_A)

a_q = []
for i in list_A:
    hp.heappush(a_q, -1*i)

for i in range(m):
    tmp = hp.heappop(a_q)
    tmp = hp.heappush(a_q, int(tmp/2))

print(-sum(a_q))

Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
list_A = list(map(int, input().split()))

for i in range(m):
    max_tmp = max(list_A)
    for j in range(len(list_A)):
        if list_A[j] == max_tmp:
            list_A[j] = int(list_A[j]/2)
            break

            # print(i, j, list_A[j])

print(sum(list_A))

Fixed submission:
import heapq as hp
n, m = map(int, input().split())
list_A = list(map(int, input().split()))
# list_A = sorted(list_A)

a_q = []
for i in list_A:
    hp.heappush(a_q, -1*i)

for i in range(m):
    tmp = hp.heappop(a_q)
    tmp = hp.heappush(a_q, int(tmp/2))

print(-sum(a_q))
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
count = 1
for i in range(100000):
    count = count + A - i
    if count > B
        print(i)
        exit()

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

if B == 1:
    print(0)
    exit()
    
for i in range(1, 400):
    count = count + A - 1
    if count >= B:
        print(i)
        exit()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_H  = list(map(int, input().split()))

list_result = []
# どこを選ぶか
for i in range(n):
    
    result = 0
    # その条件で何回移動可能かを調べる
    for j in range(i, n - 1):
        #移動可能かを調べる
        if list_H[j] >= list_H[j+1]:
            result = result + 1
        else:
            break
    list_result.append(result)
    # print(i, result)
    
print(max(list_result))
        

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

#右の数字よりもおっきいときに１，ちっさいときに０
list_H_01 = []
for i in range(n-1):
    if list_H[i] >= list_H[i+1]:
        list_H_01.append(1)
    else:
        list_H_01.append(0)
        
count = 0
list_result=[]
for i in list_H_01:
    
    if i == 0:
        list_result.append(count)
        count = 0
    if i == 1:
        count = count+1
        
list_result.append(count)
        
print(max(list_result))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

list_s = []
for i in range(n):
    s = input()
    list_s_tmp = []
    for j in s:
        list_s_tmp.append(j)
    
    list_s.append(sorted(list_s_tmp))

result = 0
for i in range(len(list_s)):
    for j in range(i, len(list_s)):
        if list_s[i] == list_s[j]:
            result = result + 1

print((result - n))

Fixed submission:
n = int(input())

d = {}
ans = 0
for i in range(n):
    list_s = sorted(list(input()))

    s = ""
    for j in list_s:
        s = s + j

    if s in d:
        ans = ans + d[s]
        d[s] += 1
    else:
        d[s] = 1

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
list_h = list(map(int, input().split()))

# 左から走査する
for i in reversed(range(1, n)):
    print(list_h, i)
    l, r = list_h[i-1], list_h[i]

    #左が小さい場合
    if l <= r:
        continue

    #一個だけ左が大きい場合
    elif l - 1 == r:
        list_h[i-1] = list_h[i-1] -1
        continue
    #あかんパターン
    else:
        print("No")
        exit()

print("YES")

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

# 右から左へ走査する
for i in reversed(range(1, n)):
    l, r = list_h[i-1], list_h[i]

    #左が小さい場合
    if l <= r:
        continue

    #一個だけ左が大きい場合
    elif l - 1 == r:
        list_h[i-1] = list_h[i-1] -1
        continue

    #あかんパターン
    else:
        print("No")
        exit()

print("Yes")

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

# 左から走査する
for i in range(n-1):
    l, r = list_h[i], list_h[i+1]
    if l == R:
        continue
    elif l + 1 == r:
        list_h[i+1] = list_h[i+1] -1
        continue
    else:
        print("No")
        exit()

print("YES")

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

# 右から左へ走査する
for i in reversed(range(1, n)):
    l, r = list_h[i-1], list_h[i]

    #左が小さい場合
    if l <= r:
        continue

    #一個だけ左が大きい場合
    elif l - 1 == r:
        list_h[i-1] = list_h[i-1] -1
        continue

    #あかんパターン
    else:
        print("No")
        exit()

print("Yes")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

list_A = []
for i in range(n):
    list_A.append(int(input()))

for i in range(len(list_A)):
    list_check = list_A[:i] + list_A[i+1:]
    print(max(list_check))

Fixed submission:
n = int(input())

list_A = []
for i in range(n):
    list_A.append(int(input()))

#リスト内の最大の値を格納
max_val = max(list_A)

#リスト内の最大の値の位置を格納
for i in range(len(list_A)):
    if list_A[i] == max_val:
        max_val_position = i
        break

#リスト内のから最大の要素を除いた後の，最大の要素
max_val_2 = max(list_A[:max_val_position] + list_A[max_val_position+1:])

for i in range(len(list_A)):
    
    #リスト内の最大の数が除かれたときは二番目に大きい数を出力する
    if i == max_val_position:
        print(max_val_2)
    else:
        print(max_val)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

list_d = sorted(list(map(int, input().split())))

d_max = max(list_d)
d_min = min(list_d)

score = 0
for i in range(d_min, d_max+2):

    #abcを数える
    score1 = 0
    score2 = 0
    for j in list_d:
        if j < i:
            score1 += 1

        if j >= i:
            score2 += 1


    if score1 == score2:
        score += 1

print(score)

Fixed submission:
n = int(input())

list_d = sorted(list(map(int, input().split())))

list_b = list_d[:int(n/2)]
list_r = list_d[int(n/2):]
print(len(list(range(list_b[-1] + 1, list_r[0] + 1))))
Buggy python submission (verdict: Runtime Error):
import pandas as pd
s = input()

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        print("Bad")
        exit()

print("Good")

Fixed submission:
s = input()

for i in range(len(s)-1):
    if s[i] == s[i+1]:
        print("Bad")
        exit()

print("Good")
Buggy python submission (verdict: Runtime Error):
import pandas as pd
n = int(input())

list_A = []
list_B = []

for i in range(n):
    a, b = map(int, input().split())
    list_A.append(a)
    list_B.append(b)

# print(list_A , list_B)

df = pd.DataFrame()
df["a"] = list_A
df["b"] = list_B
df = df.sort_values(["b", "a"]).reset_index(drop = True)
for i in df.index[1:]:
    df.loc[i, "a"] = df.loc[i, "a"] + df.loc[i-1, "a"]
    if df.loc[i, "a"] > df.loc[i, "b"]:
        print("No")
        exit()
print("Yes")

Fixed submission:
import heapq as hq

n = int(input())

list_A = []
list_B = []
h = []
for i in range(n):
    a, b = map(int, input().split())
    hq.heappush(h, [b, a])

time = 0
for _ in range(n):
    b, a = hq.heappop(h)
    time += a
    if b < time:
        print("No")
        exit()

print("Yes")
Buggy python submission (verdict: Runtime Error):
a, p = map(int, input().split())
print(int((a*3 + p)/2)

Fixed submission:
a, p = map(int, input().split())
print(int((a*3 + p)/2))
Buggy python submission (verdict: Runtime Error):
t, x, y = 0, 0, 0
tn, xn, yn = 0, 0, 0

for i in list_plan:
    tn, xn, yn = int(i[0]) - t, int(i[1]) - x, int(i[2]) - y
    tn, xn, yn = abs(tn), abs(xn), abs(yn)
    if xn + yn < tn and (tn - xn - yn)%2 == 0:
        t, x, y = i[0], i[1], i[2]
    else:
        print("No")
        exit()
        
print("Yes")
    

Fixed submission:
n = int(input())
list_plan = []
for i in range(n):
    t, x, y = map(int, input().split())
    list_plan.append([t, x, y])

for i in list_plan:
    t, x, y = i[0], i[1], i[2]
    if x + y <= t and (t - x - y)%2 == 0:
        pass
    else:
        print("No")
        exit()

print("Yes")