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

Fixed submission:
n,d = map(int,input().split())
a=[]
b=[]
cnt = 0
for i in range(n):
    c, e = map(int,input().split())
    if c**2+e**2<=d**2:
        cnt += 1
print("{}".format(cnt))

Buggy submission (verdict: Runtime Error):
n,d = map(int,input().split())
a=[]
b=[]
cnt = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())
    if a[i]**2+b[i]**2<=d**2:
        cnt += 1
print("{}".format(cnt))

Buggy submission (verdict: Runtime Error):
import numpy
n,d = map(int,input().split())
a=[]
b=[]
cnt = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())
    if numpy.sqrt(a[i]**2+b[i]**2)<=d:
        cnt += 1
print("{}".format(cnt))

Buggy submission (verdict: Runtime Error):
n,d = map(int,input().split())
a=[]
b=[]
cnt = 0
for i in range(n):
    a[i],b[i] = map(int,input().split())
    if(sqrt(a[i]**2+b[i]**2)<=d)
        cnt += 1
print("{}".format(cnt))
Problem p02594 (python)

Fixed submission:
X = int(input())
if X >= 30:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
X = int(input())
if X >= 30:
  print("Yes")
else:
  pritn("No")

Buggy submission (verdict: Runtime Error):
X = input()
if X >= 30:
  print("Yes")
else:
  print("No")
Problem p02595 (python)

Fixed submission:
ND = input()
N = int(ND.split()[0])
D = int(ND.split()[1])
count = 0
for i in range(N):
  XiYi = input()
  Xi = int(XiYi.split()[0])
  Yi = int(XiYi.split()[1])
  R = (Xi**2+Yi**2)**(1/2)
  if R <= D:
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
N = int(input().split()[0])
D = int(input().split()[1])
count = 0
for i in range(N):
  Xi = int(input().split()[0])
  Yi = int(input().split()[1])
  R = (Xi**2+Yi**2)**(1/2)
  if R<=D:
    count += 1
print(count)
Problem p02711 (python)

Fixed submission:
N = input()

if "7" in N:
    print("Yes")
else:
    print("No")

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

if 7 in N:
    print("Yes")
else:
    print("No")
Problem p02629 (python)

Fixed submission:
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    s -= 26 ** i
    if s <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
    number = min(26, n // 26 ** (i-1))
    n -= number * 26 ** (i-1)
    n_list.append(number)
n_l = []
for i, x in  enumerate(reversed(n_list)):
    if x <= 0:
        n_l.append(x + 26)
        n_list[-(i+2)] -= 1
    else:
        n_l.append(x)
for i in reversed(n_l):
    answer.append(l[i-1])
print(''.join(answer))

Buggy submission (verdict: Runtime Error):
import string
import itertools
n = int(input())
s = n
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    s -= 26 ** i
    if s <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(1, count+1)):
    number = n // 26 ** (i-1)
    n %= 26 ** (i-1)
    n_list.append(number)
for i in n_list:
    answer.append(l[i-1])
print(''.join(answer))

Buggy submission (verdict: Runtime Error):
import string
import itertools
n = int(input())
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    n -= 26 ** i
    if n <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(count)):
    number = n // 26 ** i
    n %= 26 ** i
    n_list.append(number)
for i in n_list:
    answer.append(l[i-1])
print(''.join(answer))

Buggy submission (verdict: Runtime Error):
import string
import itertools
n = int(input())
l = list(string.ascii_lowercase)
count = 1
for i in range(1, 100):
    n -= 26 ** i
    if n <= 0:
        break
    else:
        count += 1
n_list = []
answer = []
for i in reversed(range(count)):
    number = n // 26 ** i
    n %= 26 ** i
    n_list.append(number)
for i in n_list:
    answer.append(l[i-1])
print(''.join(answer))

Buggy submission (verdict: Runtime Error):
import string
import itertools
n = int(input())
l = list(string.ascii_lowercase)
l.insert(0, 0)

amari = []
while n != 0:
    amari.append(n % 26)
    n = n // 26
amari.reverse()
answer_list = []
for i in amari:
    if type(i) == int:
        answer_list.append(l[i])
ans = ''.join(answer_list)
print(ans)
Problem p02695 (python)

Fixed submission:
import itertools
N, M, Q = map(int,input().split())
s = [tuple(map(int, input().split())) for i  in range(Q)]
l = list(range(1,M+1))
ans = []
for v in itertools.combinations_with_replacement(l, N):
    count = 0
    for i in range(Q):
        a, b, c, d = s[i]
        if v[b-1] - v[a-1] == c:
            count += d
    ans.append(count)
print(max(0, max(ans)))

Buggy submission (verdict: Runtime Error):
import itertools
N, M, Q = map(int,input().split())
s = [tuple(map(int, input().split())) for i  in range(Q)]
l = list(range(1,M+1))
ans = []
for v in itertools.combinations(l, N):
    new_v = sorted(v)
    count = 0
    for i in range(Q):
        a, b, c, d = s[i]
        if new_v[b-1] - new_v[a-1] == c:
            count += d
    ans.append(count)
print(max(0, max(ans)))
Problem p02699 (python)

Fixed submission:
S, W = map(int, input().split())
if S <= W:
    print('unsafe')
else:
    print('safe')

Buggy submission (verdict: Runtime Error):
A, B, C, D = map(int, input().split())
while A > 0 and C > 0:
    C = C - B
    A = A - D
if A == 0:
    ans = 'No'
else:
    ans = 'Yes'
print(ans)
Problem p02753 (python)

Fixed submission:
S = str(input())
if S[0] == S[1] == S[2]:
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
loop = N // (A + B)
amari = N % (A + B)
blue = A * loop + min(A, amari)
print(blue)
Problem p02771 (python)

Fixed submission:
A, B, C = map(int, input().split())
l = [A, B, C]
ans = list(set(l))
if len(ans) == 2:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
list = [A, B, C]
ans = list(set(list))
if len(ans) == 2:
    print('Yes')
else:
    print('No')
Problem p02847 (python)

Fixed submission:
from sys import stdin
INF = float("inf")#無限大の設定1
IINF = 10 ** 18#無限大の設定2
MOD = 10 ** 9 + 7#まれに用いるmodを予め設定しておく
n = (stdin.readline().rstrip())
#l = list(map(int, stdin.readline().rstrip().split()))
#A, B, C = map(int, stdin.readline().rstrip().split())
#S = [list(stdin.buffer.readline().decode().rstrip()) for _ in range(h)]
S =['SUN','MON','TUE','WED','THU','FRI','SAT']
a = S.index(n)
print(len(S) - a)

Buggy submission (verdict: Runtime Error):
from sys import stdin
INF = float("inf")#無限大の設定1
IINF = 10 ** 18#無限大の設定2
MOD = 10 ** 9 + 7#まれに用いるmodを予め設定しておく
n = (stdin.readline().rstrip())
#l = list(map(int, stdin.readline().rstrip().split()))
#A, B, C = map(int, stdin.readline().rstrip().split())
#S = [list(stdin.buffer.readline().decode().rstrip()) for _ in range(h)]
S =['SUN','MON','TUE','WEN','THU','FRI','SAT']
a = S.index(n)
print(len(S) - a)
Problem p03805 (python)

Fixed submission:
import itertools
n, m = map(int, input().split())
path = [[False] * n for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    path[a][b] = True
    path[b][a] = True
ans = 0
for i in itertools.permutations(range(n), n):
    if i[0] == 0:
        for j in range(n):
            if j == n - 1:
                ans += 1
                break
            if not path[i[j]][i[j+1]]:
                break
print(ans)

Buggy submission (verdict: Runtime Error):
import itertools
n, m = map(int, input().split())
path = [[False] * n for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    path[a][b] = True
    path[b][a] = True
ans = 0
for i itertools.permutations(range(n), n):
    if i[0] == 0:
        for j in range(n):
            if j == n - 1:
                ans += 1
                break
            if not path[i[j]][i[j+1]]:
                break
print(ans)
Problem p02594 (python)

Fixed submission:
X = int(input())

if X >= 30:
    print('Yes')
else:
    print('No')

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

if X >= 30:
    print('Yes')
else:
    print('No')
Problem p02699 (python)

Fixed submission:
S, W= map(int,input().split())

if S <= W:
    print("unsafe")
else :
    print("safe")

Buggy submission (verdict: Runtime Error):

S, W= map(int,input().split(""))

if S < W:
    print("unsafe")
else :
    print("safe")
Problem p02676 (python)

Fixed submission:
k=int(input())
s=input()
if len(s)> k:
  print(s[:k]+'...')
if len(s)<=k:
  print(s)

Buggy submission (verdict: Runtime Error):
s=input()
k=int(input())
if len(s)> k:
  print(s[:k]+'...')
if len(s)<=k:
  print(s)
Problem p02711 (python)

Fixed submission:
s= input()
i=0
res=[]
while i< len(s):
  j=s[i:i+1]
  res.append(j)
  i+=1
print('Yes' if str(7) in res else 'No')

Buggy submission (verdict: Runtime Error):
a= input()
i=0
while i< len(s):
  j=s[i:i+1]
  if j==7:
    print('Yes')
    break
  i+=1
Problem p02712 (python)

Fixed submission:
n=int(input())
cnt=0
for i in range(1,n+1):
  if i%3==0 or i%5==0:
    cnt+=0
  else:
    cnt+=i
print(cnt)

Buggy submission (verdict: Runtime Error):
n=input()
cnt=0
for i in range(1,n+1):
  if i%3==0 or i%5==0:
    cnt+=0
  else:
    cnt+=i
print(cnt)
Problem p02891 (python)

Fixed submission:
s=input()
k=int(input())
p=0
if s[0]==s[-1]:
  p+=1

if len(s)==1:
  print(k//2)
else:
  l=[1]
  for i in range(len(s)-1):
    if s[i]!=s[i+1]:
      l.append(1)
    else:
      l[-1]+=1
  x=[i//2 for i in l]
  y=sum(x)
  if len(l)>1:
    if s[0]==s[-1]:
      if (l[0]+l[-1])%2==1:
        print(y*k)
      else:
        print(y*k+p*(k-1))
    else:
      print(y*k+p*(k-1))
  else:
    print((len(s)*k)//2)

Buggy submission (verdict: Runtime Error):
s=input()
k=int(input())
p=0

if s[0]==s[-1]:
  p+=1

l=[1]
for i in range(len(s)-1):
  if s[i]!=s[i+1]:
    l.append(1)
  else:
    l[-1]+=1
x=[i//2 for i in l]
y=sum(x)
if s[-1]==s[-2]:
  print((y-1)*k+p*k)
else:
  print(y*k+p*(k-1))
Problem p02915 (python)

Fixed submission:
n=int(input())
print(n**3)

Buggy submission (verdict: Runtime Error):
n=int(input())
print(s**3)
Problem p02951 (python)

Fixed submission:
A,B,C = map(int,input().split())
if A-B>C:
  print(0)
else:
  print(C-(A-B))

Buggy submission (verdict: Runtime Error):
n=int(input())
h=list(map(int,input().split()))
a=True
for i in range(n):
  for j in range(i,n):
    if h[i]-h[j]>1:
      a=False
if a==False:
  print('No')
else:
  print('Yes')
Problem p02622 (python)

Fixed submission:
s = list(input())
t = list(input())
k = []
for i in range(len(s)):
    k.append(s[i] == t[i])
print(len(s)-sum(k))

Buggy submission (verdict: Runtime Error):
s,t = map(list, input().split())
k = []
for i in range(len(s)):
    k.append(s[i] == t[i])
print(len(s)-sum(k))

Buggy submission (verdict: Runtime Error):
s,t = map(list, input().split())
k = []
for i in range(len(s)):
    k.append(s[i] !=t[i])
print(sum(k))
Problem p02659 (python)

Fixed submission:

A,B = input().split()
A = int(A)
B = int(B[0]+B[2:])
print(A*B//100)

Buggy submission (verdict: Runtime Error):
A,B = input().split()
A = int(a)
B = int(B[0]+B[2:])
print(A*B//100)

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

B = int(b[0]+b[2:])
print(A*B//100)
Problem p02693 (python)

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

x = list(range(A, B+1))

for i in x:
  if i % K == 0:
    print('OK')
    break
  elif i == B:
    print('NG')
  else:
    pass

Buggy submission (verdict: Runtime Error):
N, M, Q = map(int, input().split())
l = []
for i in range(Q):
  l.append(list(map(int, input().split())))

A_N = [[i] for i in range(1, M+1)]
for i in range(N-1):
  a = []
  for j in range(len(A_N)):
    last = A_N[j][-1]
    for k in range(last, M+1):
      a.append(A_N[j] + [k])
  A_N = a

high_score = 0
for i in range(len(A_N)):
    A = A_N[i]
    score = 0
    for j in range(len(l)):
        aj, bj, cj, dj = l[j]
        if A[bj-1]-A[aj-1] == cj:
            score += dj
        high_score = max(high_score, score) 
        
print(high_score)
Problem p03011 (python)

Fixed submission:
P, Q, R =map(int ,input().split())
print(min(P+Q, Q+R, R+P))

Buggy submission (verdict: Runtime Error):
P, Q, R =map(int ,input().split(','))
print(min(P+Q, Q+R, R+P))

Buggy submission (verdict: Runtime Error):
P, Q, R = int(input()), int(input()), int(input())
print(min(P+Q, Q+R, R+P))

Buggy submission (verdict: Runtime Error):
P, Q, R = int(input('P:')), int(input('Q:')), int(input('R:'))
print(P, Q, R)
print(min(P+Q, Q+R, R+P))

Buggy submission (verdict: Runtime Error):
P, Q, R = int(input('P:')), int(input('Q:')), int(input('R:'))
print(P, Q, R)
print(min(P+Q, Q+R, R+P))
Problem p02627 (python)

Fixed submission:
a = input()
if a.isupper():
  print("A")
else:
  print("a")

Buggy submission (verdict: Runtime Error):
a = inputs()
if a.isupper():
  print("A")
else:
  print("a")
Problem p02773 (python)

Fixed submission:
num = int(input())
i = [input() for _ in range(num)]
 
count_dict = {}
for ele in i:
  if ele not in count_dict:
    count_dict[ele] = 1
  else:
    count_dict[ele] += 1
 
max_count = max(count_dict.values())
max_str = [a for a in count_dict if count_dict[a] == max_count]
for string in sorted(max_str):
  print(string)

Buggy submission (verdict: Runtime Error):
num = int(input())
i = [int(input()) for _ in range(num)]

count_dict = {}
for ele in i:
  if ele not in count_dict:
    count_dict[ele] = 1
  else:
    count_dict[ele] += 1

max_count = max(count_dict.values())
max_str = [a for a in count_dict if count_dict[a] == max_count]
for string in sorted(max_str):
  print(string)

Buggy submission (verdict: Runtime Error):
num = int(input())
i = [int(input()) for _ in range(num)]

count_dict = {}
for ele in i:
  if ele not in count_dict:
    count_dict[ele] = 1
  else:
    count_dict[ele] += 1
    
max_count = max(count_dict.values())
max_str = [a for a in count_dict if count_dict[a] == max_count]
for string in sorted(max_str):
  print(string)
Problem p02779 (python)

Fixed submission:
num = input()
str_list = input().split(" ")
 
yes = True
num_dict = {}
for s in str_list:
	if s in num_dict:
		yes = False
		break
	else:
		num_dict[s] = 1
if yes:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
num = input()
str_list = input.split(" ")
 
yes = True

for index, s in enumerate(str_list):
	if s in str_list[:index]:
		yes = False
		break
if yes:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
num = int(input())
str_list = input.split(" ")

yes = True
 
for index, s in enumerate(str_list):
	if s in str_list[:index]:
		yes = False
		break
if yes:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
num = int(input())
str_list = input.split(" ")

yes = True
 
for index, s in enumerate(str_list):
	if s in str_list[:index]:
    	yes = False
		break
if yes:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
num = int(input())
str_list = input.split(" ")

yes = True

for index, s in enumerate(str_list):
	if s in str_list[:index]:
    	yes = False
   		break
if yes:
	print("YES")
else:
	print("NO")

Buggy submission (verdict: Runtime Error):
num = int(input())
str_list = input.split(" ")
 
num_dict = {}
yes = True
for s in str_list:
  if s in num_dict:
    yes = False
    break
  else:
    num_dict[s] = 1
if yes:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
num = int(input())
str_list = input.split(" ")

num_dict = {}
for s in str_list:
  if s in num_dict:
    print("NO")
    return
  else:
    num_dict[s] = 1
print("YES")
Problem p02785 (python)

Fixed submission:
N, K = input().split(" ")
H = list(map(int, input().split()))
H.sort()
K = int(K)

if K >= int(N):
	print(0)
elif K == 0:
	print(sum(H))
else:
	print(sum(H[:-K]))

Buggy submission (verdict: Runtime Error):
N, K = input().split(" ")
H = list(map(int, input().split()))
H.sort()
K = int(K)

if K >= len(H):
	print(0)
elif: K == 0:
	print(sum(H))
else:
	print(sum(H[:-K]))

Buggy submission (verdict: Runtime Error):
N, K = input().split(" ")
H = list(map(int, input().split()))
H.sort()
K = int(K)
 
if K >= int(N):
	print(0)
elif: K == 0:
	print(sum(H))
else:
	print(sum(H[:-K]))

Buggy submission (verdict: Runtime Error):
N, K = input().split(" ")
H = list(map(int, input().split()))
H.sort()
K = int(K)

if K >= N:
	print(0)
elif: K == 0:
    print(sum(H))
else:
	print(sum(H[:-K]))

Buggy submission (verdict: Runtime Error):
N, K = input().split(" ")
H = list(map(int, input().split()))
H.sort()
K = int(K)
 
if K >= len(H):
	print(0)
elif: K == 0:
	print(sum(H))
else:
	print(sum(H[:-K]))

Buggy submission (verdict: Runtime Error):
N, K = input().split(" ")
H = list(map(int, input().split()))
H.sort()
K = int(K)
 
if K >= len(H):
	print(0)
elif: K == 0:
    print(sum(H))
else:
	print(sum(H[:-K]))

Buggy submission (verdict: Runtime Error):
N, K = input().split(" ")
H = list(map(int, input().split()))
sorted_H = sort(H)
K = int(K)
print(sum(H[:-K]))
Problem p02951 (python)

Fixed submission:
a, b, c = [ int(i) for i in input().split()]

print(max(0, c-(a-b)))

Buggy submission (verdict: Runtime Error):
num = input()
list_step = [int(i) for i in input().split()]
 
minus = False
for i in range(int(num)-1):
  diff = list_step[i+1] - list_step[i]
  if diff >= 0:
    minus = False
    continue
  elif diff < -1:
    print("No")
    exit()
  elif i!=0:
    if list_step[i-1]>list_step[i]:
      print("No")
      exit()
    elif list_step[i-1] == list_step[i] and minus:
      print("No")
      exit()
  minus = True
 
print("Yes")
Problem p02594 (python)

Fixed submission:
x = int(input())
if x >= 30:
    print("Yes")
else:
    print("No")

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

if X >= 30:
  print("Yes")
else:
  print("No")
Problem p02595 (python)

Fixed submission:
from math import sqrt
 
n, d = map(int, input().split())
xy = [list(map(int, input().split()))for _ in range(n)]
 
ans = 0
for x, y in xy:
    s = sqrt(x ** 2 + y ** 2)
    if s <= d:
        ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
import math

end = 0

n = input().split(" ")
ato = n[0]

for i in range(int(ato)):   #すべて変数に入れる
    x = input().split(" ")
    exec("intX%d = %d" % (i,int(x[0])))
    exec("intY%d = %d" % (i,int(x[1])))

for i in range(int(ato)):
    answer = math.sqrt(pow(eval("intX" + str(i),2)) + pow(eval("intY" + str(i))))
    if answer <= n[1]:
        end = end + 1

print(end)
Problem p02594 (python)

Fixed submission:
x = int(input())
if x>=30:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x = int(input())
if x=>30:
    print("Yes")
else:
    print("No")
Problem p02659 (python)

Fixed submission:
a,b=input().split()
#a=10
#b=9.99
from decimal import*
A=Decimal(str(a))
AA=A.quantize(Decimal('0'),rounding=ROUND_FLOOR)
B=Decimal(str(b))
BB=B.quantize(Decimal('0.01'),rounding=ROUND_FLOOR)
#print(AA)
#print(BB)
K=AA*BB
KK=K.quantize(Decimal('0'),rounding=ROUND_FLOOR)
print(KK)

#a='10'
#b='9.99'
#aa=int(a)
#bb=float(b)
#print(int(aa*bb))

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

#a='3'
#b='1,1'
aa=int(a)
bb=float(b)
print(int(aa*bb))a,b=map(float,input().split())

from decimal import*
A=Decimal(str(a))
AA=A.quantize(Decimal('0'),rounding=ROUND_FLOOR)
B=Decimal(str(b))
BB=B.quantize(Decimal('0.01'),rounding=ROUND_FLOOR)

K=AA*BB
print(int(K))

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

#a=198
#b=1.10

print(int(a*b))
Problem p02682 (python)

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


if a>=k:
    Result=k
elif a+b>=k>a:
    Result=a
else:
    Result=2*a-k+b

print(Result)

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

if a>=k:
    Result=k
elif a+b>=k>a:
    Result=a
else:
    Result=2a-k+b

print(Result)

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


if a>=k:
    Result=k
elif a+b>=k:
    Result=a
else:
    Result=2a-k+b

print(Result)
Problem p03835 (python)

Fixed submission:
k,s=map(int,input().split())
#k=2
#s=2
result=0
for x in range(k+1):
    for y in range(k+1):
        z=s-x-y
        if 0<=z and z<=k:
            result+=1
            
print(result)

Buggy submission (verdict: Runtime Error):
k,s=map(int,input(),split())
#k=2
#s=2
result=0
for x in range(k+1):
    for y in range(k+1):
        z=s-x-y
        if 0<=z and z<=k:
            result+=1
            
print(result)

Buggy submission (verdict: Runtime Error):
k,s=map(int,input(),split())
#k=2
#s=2
result=0
for x in range(k+1):
    for y in range(k+1):
        z=s-x-y
        if 0<=z and z<=k:
            result+=1
            
print(result)

Buggy submission (verdict: Runtime Error):
k,s=map(int,input(),split())
#k=2
#s=2
result=0
for x in range(k+1):
    for y in range(k+1):
        z=s-x-y
        if 0<=z and z<=k:
            result+=1
            
print(result)

Buggy submission (verdict: Runtime Error):
k,s=map(int,input(),split())

ans=0
for x in range(k):
    for y in range(k):
        z=S-x-y
        if 0<=s and z<=k:
            ans+=1
            
print(ans)

Buggy submission (verdict: Runtime Error):
k,s=map(int,input(),split())

ans=0
for x in range(k+1):
    for y in range(k+1):
        z=S-x-y
        if 0<=s and z<=k:
            ans+=1
            
print(ans)
Problem p02712 (python)

Fixed submission:
n = int(input())
sum = 0
for i in range(n+1):
    if not (i % 3 == 0 or i % 5 ==0):
        sum += i
print(sum)

Buggy submission (verdict: Runtime Error):
n = int(input())
sum = 0
for i in range(n+1):
    not (i % 3 == 0 and i % 5 ==0):
        sum += i
print(sum)
Problem p02688 (python)

Fixed submission:
N,K=map(int,input().split())#N人K種類
ls=[False for _ in range(N)]
for i in range(K):
  d=int(input())
  A=list(map(int,input().split()))
  for j in range(d):
    ls[A[j]-1]=True
S=0
for i in range(N):
  if ls[i]==False:
    S+=1
print(S)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())#N人K種類
ls=[False for _ in range(N)]
for i in range(K):
  d=int(input())
  A=list(map(int,input().split()))
  for j in range(d):
    ls[A[j]-1]=True
S=0
for i in range(K):
  if ls[i]==False:
    S+=1
print(S)

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
ls=[[] for _ in range(N)]
for i in range(K):
  d=int(input())
  A=list(map(int,input().split()))
  for j in range(d):
    ls[A[j]-1].append(i+1)
S=0
for i in range(K):
  if ls[i]==[]:
    S+=1
print(S)
Problem p02847 (python)

Fixed submission:
S=input()
if S=="SUN":
  print(7)
elif S=="MON":
  print(6)
elif S=="TUE":
  print(5)
elif S=="WED":
  print(4)
elif S=="THU":
  print(3)
elif S=="FRI":
  print(2)
elif S=="SAT":
  print(1)

Buggy submission (verdict: Runtime Error):
if S=="SUN":
  print(7)
elif S=="MON":
  print(6)
elif S=="TUE":
  print(5)
elif S=="WED":
  print(4)
elif S=="THU":
  print(3)
elif S=="FRI":
  print(2)
elif S=="SAT":
  print(1)