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

Fixed submission:
a = int(input())
b = int(input())
c = int(input())
d = int(input())

print(min(a,b)+min(c,d))

Buggy submission (verdict: Runtime Error):
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B, C, D = MAP()
print(min([A, B]) + min([C, D]))

Buggy submission (verdict: Runtime Error):
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B, C, D = MAP()
print(min(A, B) + min(C, D))
Problem p03455 (python)

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

if (a % 2 == 1) & (b % 2 == 1):
    print("Odd")
else:
    print("Even")

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

if a * b // 2 == 1:
  return "Odd"
else:
  return "Even"
Problem p03471 (python)

Fixed submission:
N, Y = list(map(int, input().split()))
final_ans = None
for i in range(N + 1):
    for j in range(N + 1):
        if i + j > N:
            continue
        ans = i * 10000 + j * 5000 + (N - i - j) * 1000
        if ans == Y:
            final_ans = " ".join([str(i), str(j), str(N - i - j)])
            break

if final_ans is None:
    print('-1 -1 -1')
else:
    print(final_ans)

Buggy submission (verdict: Runtime Error):
N, Y = list(map(int, input().split()))
final_ans = None
for i in range(N + 1):
    for j in range(N + 1):
        # print(i, j, N - i - j)
        ans = i * 10000 + j * 5000 + (N - i - j) * 1000
        if ans == Y:
            final_ans = f"{i} {j} {N - i - j} "
            break

if final_ans is None:
    print('-1 -1 -1 ')
else:
    print(final_ans)

Buggy submission (verdict: Runtime Error):
N, Y = list(map(int, input().split()))
final_ans = None
for i in range(N + 1):
    for j in range(N + 1):
        # print(i, j, N - i - j)
        ans = i * 10000 + j * 5000 + (N - i - j) * 1000
        if ans == Y:
            final_ans = f"{i} {j} {N - i - j}"
            break

if final_ans is None:
    print('-1 -1 -1')
else:
    print(final_ans)

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

# Flag = False
final_ans = None
for i in range(N + 1):
    for j in range(N + 1 - i):
        ans = i * 10000 + j * 5000 + (N - i - j) * 1000
        if ans == Y:
            final_ans = f"{i} {j} {N - i - j}"
            break

if final_ans is None:
    print('-1 -1 -1')
else:
    print(final_ans)
Problem p03479 (python)

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

cnt = 1
x = X
while True:
    x = 2 * x
    if x > Y:
        break
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
X, Y = list(map(int, input().split()))

from IPython import embed; embed(); exit();

cnt = 1
x = X
while True:
    x = 2 * x
    if x > Y:
        break
    cnt += 1
print(cnt)
Problem p03543 (python)

Fixed submission:
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
if S[0] == S[1] == S[2] or S[1] == S[2] == S[3]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

S = input()
if S[0] == S[1] == s[2] or S[1] == S[2] == s[3]:
    print("Yes")
else:
    print("No")
Problem p03680 (python)

Fixed submission:
n = int(input())
a = []
for i in range(n):
  a.append(int(input()))
b = a[0]
c = []
while True:
  if b == 2:
    print(len(c)+1)
    exit()
  if len(c)> n:
    print(-1)
    exit()
  else:
    c.append(b)
    b = a[c[-1]-1]

Buggy submission (verdict: Runtime Error):
import math
from collections import defaultdict

N = int(input())
a = defaultdict(list)
for i in range(1, N + 1):
    a[int(input())].append(i)

def check(key):
    # print(key)
    if key == 1:  # find goal
        return 1
    elif key == 2:  # forming infinite loop
        return math.inf
    else:
        values = a[key]
        if len(values) == 0:
            return math.inf
        return min([check(v) for v in values]) + 1

if a.get(2):
    ans = min([check(v) for v in a[2]])
else:
    ans = math.inf

if ans == math.inf:
    print(-1)
else:
    print(ans)
Problem p03737 (python)

Fixed submission:
print("".join(list(map(lambda s : s[:1], input().split(" ")))).upper())

Buggy submission (verdict: Runtime Error):
# # Make IO faster
# import sys
# input = sys.stdin.readline

# # get single (or) multiple str
# X = input()

# # get single int
# N = int(input())
# # get multiple int (e.g., 2)
# X, Y = map(int, input().split())
# # get multiple int (e.g., 2) for N lines
# XY = [list(map(int, input().split())) for _ in range(N)]

# from IPython import embed; embed(); exit();

# 全部入り
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

s1, s2, s3 = input().split()
print(upper(s1[0]) + upper(s2[0]) + upper(s3[0]))
Problem p03852 (python)

Fixed submission:
c = input()
if c in ['a', 'i', 'u', 'e', 'o']:
	print('vowel')
else:
 	print('consonant')

Buggy submission (verdict: Runtime Error):
c = input()
if c in ['a', 'i', 'u', 'e', 'o']:
	print('vowel')
else
 	print('consonant')

Buggy submission (verdict: Runtime Error):
c = input()
if c in ['a', 'i', 'u', 'e', 'o']:
  print('vowel')
else
  print('consonant')
Problem p03854 (python)

Fixed submission:
txt = input()
cands = ["dream", "dreamer", "erase", "eraser"]

success = True
while len(txt) > 0:
    flag = False

    for cand in cands:
        subtxt = txt[len(txt) - len(cand):]
        if subtxt == cand:
            txt = txt[:len(txt) - len(cand)]
            flag = True
            break

    if not flag:
        success = False
        break

if success:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
txt = input()
cands = ["dream", "dreamer", "erase", "eraser"]

success = True
while len(txt) > 0:
    flag = False

    for cand in cands:
        subtxt = txt[len(txt) - len(cand):]
        if subtxt == cand:
            txt = txt[:len(txt) - len(cand)]
            flag = True
            print(txt)
            break

    if not flag:
        success = False
        break

if success:
    print("YES")
else:
    print("No")
Problem p03943 (python)

Fixed submission:
def MAP(): return map(int, input().split())
x = sorted(MAP())
if x[0] + x[1] == x[2]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
def MAP(): return map(int, input().split())
x = sorted(MAP(x))
if x[0] + x[1] == x[2]:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
def MAP(): return map(int, input().split())
x = sorted(MAP(x))
if x[0] + x[1] == x[2]:
  print("Yes")
else:
  print("No")
Problem p03998 (python)

Fixed submission:
A =list(str(input()))
B =list(str(input()))
C =list(str(input()))
P=A
for i in range(len(A)+len(B)+len(C)+3):
    if P[0] == 'a':
        P.pop(0)
        P=A
        if len(A) ==0:
            print('A')
            break
    elif P[0] =='b':
        P.pop(0)
        P=B
        if len(B) ==0:
            print('B')
            break
    elif P[0] =='c':
        P.pop(0)
        P=C
        if len(C) ==0:
            print('C')
            break

Buggy submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long ll;
typedef pair<int, int> P;
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;
struct Edge {
  ll to;
  ll cost;
};
int main() {
  string sa, sb, sc;
  cin >> sa >> sb >> sc;
  char now = 'a';
  while (true) {
    if (now == 'a') {
      if (sa.size() == 0) {
        cout << 'A' << endl;
        return 0;
      }
      now = sa[0];
      sa.erase(sa.begin());
    } else if (now == 'b') {
      if (sb.size() == 0) {
        cout << 'B' << endl;
        return 0;
      }
      now = sb[0];
      sb.erase(sb.begin());
    } else {
      if (sc.size() == 0) {
        cout << 'C' << endl;
        return 0;
      }
      now = sc[0];
      sc.erase(sc.begin());
    }
  }
}
Problem p02641 (python)

Fixed submission:
x,n=map(int,input().split())
P=list(map(int,input().split()))
Q=P.copy()

for i in range(n):
    P[i]=abs(P[i]-x)
P.sort()
count = -1
for i in range(n):
    if (i+1)//2 == P[i]:
        continue
    else:
        count=(i+1)//2
        break

if n%2==0 and count==-1:
    count=n//2
elif n%2==1 and count==-1:
    count=(n+1)//2

if n==0:
    print(x)
elif x-count in Q:
    print(x+count)
else:
    print(x-count)

Buggy submission (verdict: Runtime Error):
x,n=map(int,input().split())
P=list(map(int,input().split()))
Q=P.copy()
for i in range(n):
    P[i]=abs(P[i]-x)
P.sort()

for i in range(n):
    if (i+1)//2 == P[i]:
        continue
    else:
        count=(i+1)//2
        break

if n==0:
    print(x)
elif x-count in Q:
    print(x+count)
else:
    print(x-count)
Problem p02665 (python)

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

b = 1
B=[0]*(n+1)
count = 0

t=len(A)-1
for i in range(t):
    B[i] = b
    if 2*(b - A[i]) < A[i+1]:
        count += 1
        break
    b = 2*(b - A[i])
B[n] = b

if n == 0 and A[0] > 1:
    count += 1

j = 0
while count == 0 and A[t] > B[j]:
    if j == n:
        break
    j += 1

total = 0
for i in range(j):
    total += B[i]

s = A[t]
for i in range(t-1,j-1,-1):
    total += min(B[i],s+A[i])
    s+=A[i]

if count==0:
    print(total+A[t])
else:
    print('-1')

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

b = 1
B=[0]*(n+1)
count = 0
for i in range(n):
    B[i] = b
    if 2*(b - A[i]) < A[i+1]:
        count += 1
    b = 2*(b - A[i])

B[n] = b

j = 0
while A[n] > B[j]:
    j+=1
    if j == B[len(B)-1]:
        break

total = 0
for i in range(j):
    total += B[i]

s = A[n]
for i in range(n-1,j-1,-1):
    total += min(B[i],s+A[i])
    s+=A[i]

if count==0:
    print(total+A[n])
else:
    print('-1')

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

b = 1
B=[0]*(n+1)
count = 0
for i in range(n):
    B[i] = b
    if 2*(b - A[i]) < A[i+1]:
        count += 1
    b = 2*(b - A[i])

B[n] = b

j = 0
while A[n] > B[j]:
    j+=1

total = 0
for i in range(j):
    total += B[i]

s = A[n]
for i in range(n-1,j-1,-1):
    total += min(B[i],s+A[i])
    s+=A[i]

if count==0:
    print(total+A[n])
else:
    print('-1')

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

b = 1
B=[0]*(n+1)
count = 0
for i in range(n):
    B[i] = b
    if 2*(b - A[i]) < A[i+1]:
        count += 1
    b = 2*(b - A[i])

B[n] = b

j = 0
while A[n] > B[j]:
    j+=1
    print(j,A[n],B[j])

total = 0
for i in range(j):
    total += B[i]

print(total)
s = A[n]
for i in range(n-1,j-1,-1):
    total += min(B[i],s+A[i])
    print(B[i],s+A[i])
    s+=A[i]

if count==0:
    print(total+A[n])
else:
    print('-1')

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

#存在するかどうか
b = 1
B=[0]*(n+1)
count = 0
for i in range(n):
    B[i] = b
    if 2*(b - A[i]) < A[i+1]:
        count += 1
    b = 2*(b - A[i])

B[n] = b

j = 0
while A[n] >= B[j]:
    j+=1

total = 0
for i in range(j):
    total += B[i]

s = A[n]
for i in range(n-1,j-1,-1):
    total += min(B[i],s+A[i])
    s+=A[i]+A[n]

if count==0:
    print(total+A[n])
else:
    print('-1')
Problem p02684 (python)

Fixed submission:
'''
path = 'sub1_51.txt'
f=open(path)
data1 = f.read()
f.close()
N=data1.split()
'''
n,k=map(int,input().split())
A=list(map(int,input().split()))
'''
n=int(N[0])
k=int(N[1])
A=N[2:]
'''
A=[int(i)-1 for i in A]
B=[]
cnt=[0]*n
m=0
for i in range(2*10**5):
    B.append(m)
    cnt[m]+=1
    if cnt[m]>1:
        break
    m=A[m]
c=len(B)-(B.index(m)+1)
print(1+B[(max(k-B.index(m),0))%c + min(B.index(m),k)])
#Bは街の移動順序
#cはループの長さ

Buggy submission (verdict: Runtime Error):
import collections 
n,k = map(int,input().split())
A = list(map(int,input().split()))
B=[1]
m=0
for i in range(n):
    B.append(A[m])
    m=A[m]-1

D=collections.Counter(A)
for i in range(n):
    if D[i+1]==1:
        del D[i+1]

if D!={}:
    for i in range(len(B)):
        if B[i] in D.keys():
            M=B[i]
            j=i+1
            break
else:
    M=1
    j=1
l=j
while B[l]!=M:
    l+=1

T=l-j+1
print(B[k-((k-j)//T)*T])
Problem p02696 (python)

Fixed submission:
a,b,n = map(int, input().split())
m = min(n,b-1)
print(int(a*m/b)-a*int(m/b))

Buggy submission (verdict: Runtime Error):
a,b,n = map(int, input().split())
M = [0]*b
for x in range(0,b):
    M[x] = int(a*x/b) - a*int(x/b)

print(max(M))

Buggy submission (verdict: Runtime Error):
a,b,n = map(int, input().split())
M = [0]*(n+1)
for x in range(0,n+1):
    M[x] = int(int(a*x/b) - a*int(x/b))

print(max(M))

Buggy submission (verdict: Runtime Error):
a,b,n = map(int, input().split())
M = [0]*(n+1)
for x in range(0,n+1):
    M[x] = int(a*x/b) - a*int(x/b)

print(max(M))

Buggy submission (verdict: Runtime Error):
a,b,n = map(int, input().split())
M = [0]*(n+1)
for i in range(n+1):
    score = int(a*i/b) - a*int(i/b)
    M[i] = score

print(max(M))

Buggy submission (verdict: Runtime Error):
a,b,n = map(int, input().split())
M = [0]*(n+1)
for i in range(n+1):
    score = int(a*i/b) - a*int(i/b)
    M[i] = score

print(max(M))
Problem p02705 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
i = 0
while i<N:
    print(A.count(i+1))
    i+=1
Problem p02957 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(Int,input().split())
if (a + b) % 2 == 0:
  print((a + b)//2)
else:
  print('IMPOSSIBLE')
Problem p03043 (python)

Fixed submission:
import math

def f(n):
    cnt = 0
    while n != 0:
        n //= 2
        cnt += 1
    return max(cnt,1)

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

cnt = f(k)
ans = 0
num = n
for i in range(n):
    while cnt != 0 and k / (i+1) <= 2**(cnt - 1):
        cnt -= 1
    ans += (1 / num)*math.pow(0.5,cnt)
print(ans)

Buggy submission (verdict: Runtime Error):
def f(n):
    cnt = 0
    while n != 0:
        n //= 2
        cnt += 1
    return cnt

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

cnt = f(k)
ans = 0
num = n
for i in range(n):
    if k // (i+1) < 2**(cnt - 1):
        cnt -= 1
    ans += (1 / num)*(0.5 ** cnt)
print(ans)
Problem p03136 (python)

Fixed submission:
n = int(input())
L = list(map(int,input().split()))
kekka = 0
for i in range(n):
  if 2*L[i] >= sum(L):
    kekka = 1
    break
    
if kekka == 1:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
n = int(input())
L = [input() for i in range(n)]
kekka = 0
for i in range(n):
  if 2*L[i] > sum(L):
    kekka = 1
    break
    
if kekka == 1:
  print('No')
else:
  print('Yes')
Problem p04043 (python)

Fixed submission:
L=list(map(int,input().split()))
L.sort()
if L==[5,5,7]:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
int A,B,C

if
Problem p02909 (python)

Fixed submission:
s=input()
if(s=="Rainy"):
    print("Sunny")
elif(s=="Sunny"):
    print("Cloudy")
else:
    print("Rainy")

Buggy submission (verdict: Runtime Error):
s=input()
if(s=="Rainy"):
print("Sunny")
elif(s=="Sunny"):
print("Cloudy")
else:
print("Rainy")
Problem p02714 (python)

Fixed submission:
_input = input
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''

#ここに書きたいコードを書く
#データ読み込み

N=int(input())
S=input()

RGB_num=[0]*3

for c in S:
	if c=='R':
		RGB_num[0] += 1
	elif c=='G':
		RGB_num[1] += 1
	else:
		RGB_num[2] += 1

#print(RGB_num)
joken2=0

for i in range(N-2):
	#print("i",i,S[i+1])
	for j in range(min(i+1,N-i-2)):
		if S[i+1] != S[i-j] and S[i+1] != S[i+j+2] and S[i-j] != S[i+j+2]:
			joken2 += 1
			#print(i,j,S[i-j]+S[i+1]+S[i+j+2],"j2")
		#else:
			#print(i,j,S[i-j]+S[i+1]+S[i+j+2])

joken1=RGB_num[0]*RGB_num[1]*RGB_num[2]

print(joken1-joken2)

input = _input

Buggy submission (verdict: Runtime Error):
_input = input
#'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''

#ここに書きたいコードを書く
#データ読み込み

N=int(input())
S=input()

RGB_num=[0]*3

for c in S:
	if c=='R':
		RGB_num[0] += 1
	elif c=='G':
		RGB_num[1] += 1
	else:
		RGB_num[2] += 1

#print(RGB_num)
joken2=0

print(S[0])
for i in range(N-2):
	#print("i",i,S[i+1])
	for j in range(min(i+1,N-i-2)):
		if S[i+1] != S[i-j] and S[i+1] != S[i+j+2] and S[i-j] != S[i+j+2]:
			joken2 += 1
			#print(i,j,S[i-j]+S[i+1]+S[i+j+2],"j2")
		#else:
			#print(i,j,S[i-j]+S[i+1]+S[i+j+2])

joken1=RGB_num[0]*RGB_num[1]*RGB_num[2]

print(joken1-joken2)

input = _input
Problem p02657 (python)

Fixed submission:
s = str(input())
d = s.split()
a = int(d[0])
b = int(d[1])
c = a * b 
print(c)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input())
d = s.split()
mod = 10 ** 18
ans = int(d[0])
d.pop(0)
z = 0
if '0' in d:
	print(0)
else:
	for i in d:
		i = int(i)
		ans *= i
		if ans > mod:
			print(-1)
			z = 1
	if z == 1:
		pass
	else:
		print(ans)
Problem p02741 (python)

Fixed submission:
list_32 = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
K -= 1
print(list_32[K])

Buggy submission (verdict: Runtime Error):
import math
a, b, c = map(int, input().split())
a_sqrt = math.sqrt(a)
b_sqrt = math.sqrt(b)
c_sqrt = math.sqrt(c)

if (a==c) or (b==c):
	print('No')

elif (a_sqrt+b_sqrt) < c_sqrt:
	print('Yes')

else:
	print('No')

Buggy submission (verdict: Runtime Error):
import math
a, b, c = map(int, input().split())
a_sqrt = math.sqrt(a)
b_sqrt = math.sqrt(b)
c_sqrt = math.sqrt(c)

if (a+b) > c:
	print('No')

if (a_sqrt+b_sqrt) < c_sqrt:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
import math
a, b, c = map(int, input().split())
a_sqrt = math.sqrt(a)
b_sqrt = math.sqrt(b)
c_sqrt = math.sqrt(c)

a_sqrt = round(a_sqrt,-13)
b_sqrt = round(b_sqrt,-13)
c_sqrt = round(c_sqrt,-13)

if (a_sqrt+b_sqrt) < c_sqrt:
	print('Yes')
else:
	print('No')
Problem p02718 (python)

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

th = sum(A)*0.25/M

A.sort(reverse=True)

if A[M-1] >= th:
    print('Yes')
else:
    print('No')

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

th = sum(A)*0.25/M

A.sort(reverse=True)

if A[M] >= th:
    print('Yes')
else:
    print('No')