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

Fixed submission:
n = int(input())
p = [input() for i in range(n)]
s = set()
for i in range(n):
    s.add(p[i])
print(len(s))

Buggy submission (verdict: Runtime Error):
import sys
s = sys.stdin.readlines()
s = input() .split()
for i in range(1, len(s)):
    s.add(p[i])
print(len(set(s)))

Buggy submission (verdict: Runtime Error):
import sys
p = []
for l in sys.stdin:
    a.append(int(l))
s = set()
for i in range(1, len(p)):
    s.add(p[i])
print(len(set(s)))

Buggy submission (verdict: Runtime Error):
import sys
p = []
for l in sys.stdin:
    a.append(l)
s = set()
for i in range(1, len(p)):
    s.add(p[i])
print(len(set(s)))

Buggy submission (verdict: Runtime Error):
import sys
a = []
for l in sys.stdin:
    a.append(l)
p = input() .split()
s = set()
for i in range(1, len(p)):
    s.add(p[i])
print(len(set(s)))

Buggy submission (verdict: Runtime Error):
p = list((input().split()))
s = set()
for i in range(1, len(p)+1):
    s.add(p[i])
print(len(s))

Buggy submission (verdict: Runtime Error):
p = list((input().split()))
s = list()
for i in range(1, int(p[0])+1):
    s.append(p[i])
print(len(list(set(s))))

Buggy submission (verdict: Runtime Error):
p = list((input().split()))
s = []
for i in range(1, int(p[0])):
    s.append(p[i])
print(len(list(set(s))))

Buggy submission (verdict: Runtime Error):
p = list((input().split()))
s = set()
for i in range(1, int(p[0])):
    s.add(p[i])
print(len(list(s)))

Buggy submission (verdict: Runtime Error):
p = list((input().split()))
s = set()
for i in range(1, int(p[0])):
    s.add(p[i])
print(len(s))
Problem p02699 (python)

Fixed submission:
s,w = map(int,input().split())
if w >= s:
    print ('unsafe')
else:
    print ('safe')

Buggy submission (verdict: Runtime Error):
s = str(input())
a = 2019
i = 0
ans = 0
while True:
    i += 1
    b = a * i
    if b > int(s):
        break
    ans += s.count(str(b))
print (str(ans))
Problem p02688 (python)

Fixed submission:

import sys
import itertools
 
 
N, K = map(int, input().split())

nums = [ ]
for _ in range(K):
    _ =  int(input())
    nums.extend([int(x.strip()) for x in input().split(' ') ])

print(N - len(set(nums)))

Buggy submission (verdict: Runtime Error):

import sys
import itertools
 
 
N, K = map(int, input().split())

nums = [ ]
for _ in range(N):
    _ =  int(input())
    nums.extend([int(x.strip()) for x in input().split(' ') ])

print(N - len(set(nums)))
Problem p02711 (python)

Fixed submission:
import sys
 
X = input()
test = list(X)
for num in test:
  tmp = int(num)
  if tmp == 7:
    print("Yes")
    sys.exit()
print("No")

Buggy submission (verdict: Runtime Error):
# coding: utf-8
# Your code here!

N = int(input())
RGB= list(input())

count = 0
sub = 0

def index_Multi(List):
    r_list = []
    g_list = []
    b_list = []
    for val in range(0,len(List)):
        if "R" == List[val]:
            r_list.append(val)
        elif "G" == List[val]:
            g_list.append(val)
        elif "B" == List[val]:
            b_list.append(val)
    return r_list, g_list, b_list
    
r_list, g_list ,b_list = index_Multi(RGB)

for index, a in enumerate(RGB):
    if a == "R":
        del g_list[0:len([i for i in g_list if i < index])]
        del b_list[0:len([i for i in b_list if i < index])]
        for g in g_list:
            for b in b_list:
                if g-index == b-g or b-index == g-b:
                    sub +=1
        count = count + len(g_list)*len(b_list)
                    
    elif a == "G":
        del b_list[0:len([i for i in b_list if i < index])]
        del r_list[0:len([i for i in r_list if i < index])]
        for b in b_list:
            for r in r_list:
                if b-index == r-b or r-index == b-r:
                    sub +=1
        count = count + len(b_list)*len(r_list)
                
    elif a == "B":
        del r_list[0:len([i for i in r_list if i < index])]
        del g_list[0:len([i for i in g_list if i < index])]
        for r in r_list:
            for g in g_list:
                if r-index == g-r or g-index == r-g:
                    sub +=1
        count = count + len(g_list)*len(r_list) 
        
print(count-sub)

Buggy submission (verdict: Runtime Error):
import sys

X =int, input()
test = list(X)
print(test)
for num in test:
  tmp = int(num)
  if tmp == 7:
    print("Yes")
    sys.exit()
print("No")
Problem p02712 (python)

Fixed submission:
import sys
 
X = int(input())
count = 0
for num in range(1, X+1):
  if num % 3 == 0 or num % 5 == 0:
    continue
  else:
    count = count + num
print(count)

Buggy submission (verdict: Runtime Error):
import sys

X = input()
count = 0
for num in range(X):
  if not num % 3 == 0 or num % 5 == 0:
    count = count + num
print(count)
Problem p02729 (python)

Fixed submission:
# -*- coding: utf-8 -*-
N, M = map(int, input().split())
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
if N != 0:
  if N != 1:
    N_sum = combinations_count(N, 2)
  else:
    N_sum = 0
else:
  N_sum = 0
if M != 0:
  if M != 1:
    M_sum = combinations_count(M, 2)
  else:
    M_sum = 0
else:
  M_sum = 0
print(N_sum + M_sum)

Buggy submission (verdict: Runtime Error):
l=int(input())
print((l/3)**3)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
N, M= map(int, input().split())
import math
def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
if N != 0:
  N_sum = combinations_count(N, 2)
else:
  N_sum = 0
if M != 0:
  M_sum = combinations_count(M, 2)
else:
  M_sum = 0
print(N_sum + M_sum)
Problem p02711 (python)

Fixed submission:
n = input()
b = 0
for i in n:
    if i == '7':
        b= 1
        break

if b == 1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
bc = n*[0]
gc = n*[0]
rc = n*[0]
for i in range(1, n+1):
    mi = n - i
    if s[n - i] == 'B':
        if i == 1:
            bc[mi] = 1
        else:
            bc[mi] = bc[mi+1] + 1
            rc[mi] = rc[mi+1]
            gc[mi] = gc[mi+1]
    elif s[mi] == 'R':
        if i == 1:
            rc[mi] = 1
        else:
            rc[mi] = rc[mi+1] + 1
            bc[mi] = bc[mi+1]
            gc[mi] = gc[mi+1]
    elif s[mi] == 'G':
        if i ==1:
            gc[mi] = 1
        else:
            gc[mi] = gc[mi+1] + 1
            rc[mi] = rc[mi+1]
            bc[mi] = bc[mi+1]
si = 0
for i in range(0, n - 1):
    
    for j in range(i+1, n-1):
        if s[j] != s[i]:
            d = j-i 
            if j+d < n:
                nc = s[j+d]
                if nc in [s[i], s[j]]:
                    l = list(set(['R', 'G', 'B']) - set([s[i], s[j]]))
                    if l[0] == 'R':
                        si+= rc[j+1]
                    elif l[0] == 'G':
                        si += gc[j+1] 
                    else:
                        si += bc[j+1]
                else:
                    l = list(set(['R', 'G', 'B']) - set([s[i], s[j]]))
                    if l[0] == 'R':
                        si+= rc[j+1]-1
                    elif l[0] == 'G':
                        si += gc[j+1] -1
                    else:
                        si += bc[j+1] - 1
            else:
                l = list(set(['R', 'G', 'B']) - set([s[i], s[j]]))
                if l[0] == 'R':
                    si+= rc[j+1]
                elif l[0] == 'G':
                    si += gc[j+1] 
                else:
                    si += bc[j+1]
print(si)
Problem p02712 (python)

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

Buggy submission (verdict: Runtime Error):
n = input()
b = 0
s = 0
for i in n:
    if i%3 == 0 or i%5 == 0:
        continue
    else:
        s += i
        
print(s)
Problem p02771 (python)

Fixed submission:
l=set(map(int,input().split()))
if len(l)==2:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
A=list(map(int,input().split()))
ans="APPROVED"
for i in A:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            ans="DENIED"
            break
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
A=list(map(int,input().split()))
ans="APPROVED"
for i in A:
    if i%2==0:
        if i%3!=0 and i%5!=0:
            ans="DENIED"
           
            break
print(ans)
Problem p02819 (python)

Fixed submission:
x=int(input())
import math
def is_prime(n):
    if n==1:
        return False
    for divisor in range(2,int(math.sqrt(n))+1):
        if n%divisor == 0:
            return False
    return True

k=0
while True:
    if is_prime(x+k):
        print(x+k)
        break
    else:
        k += 1

Buggy submission (verdict: Runtime Error):
x=int(input())
import math
def usinig_sqrt(limit):
    for k in range(x,limit+1):
        
        factor = 0
        if k%2==0 and l != 2:
            continue
        for divisor in range(2,math.floor(math.sqrt(k))+1):
            if k%divisor == 0:
                factor += 1
        if factor == 0:
            print(k)
            exit()
         
print(usinig_sqrt(100000))
Problem p02829 (python)

Fixed submission:
a = int(input())
b= int(input())
print(6-a-b)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input())
print(6-a-b)
Problem p02933 (python)

Fixed submission:
a=int(input())
s=input()
if a>=3200:
    print(s)
elif a<3200:
    print("red")

Buggy submission (verdict: Runtime Error):
a=int(input())
s-input()
if a>=3200:
    print(s)
else:
    print("red")
Problem p03107 (python)

Fixed submission:
s=input()
print(2*(min(s.count("0"),s.count("1"))))

Buggy submission (verdict: Runtime Error):
s=input()
print(2*(min(s.count("0"),s.count("1")))
Problem p03135 (python)

Fixed submission:
t,x=map(int,input().split())
print(t/x)

Buggy submission (verdict: Runtime Error):
t,x = map(float,input().split())
print(t/x)
Problem p03207 (python)

Fixed submission:
n=int(input())
P=[int(input()) for i in range(n)]
print(sum(P)-max(P)+max(P)//2)

Buggy submission (verdict: Runtime Error):
l=[int(input()) for range(int(input())]
print(sum(l)-int(max(l)/2))
Problem p03208 (python)

Fixed submission:
n,k=map(int,input().split())
h=sorted([int(input()) for i in range(n)])
print(min([h[i+k-1]-h[i] for i in range(n-k+1)]))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
H=sorted([int(input()) for i in range(n)])
print(min([h[i+k-1]-h[i] for i in range(n-k+1)]))

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
H=sorted([int(input()) for i in range(n)])
print(min(h[i+k-1]-h[i] for i in range(n-k+1)))
Problem p03307 (python)

Fixed submission:
n = int(input())
print(n if n%2==0 else n*2)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
print(n*2//math.gcd(n,2))

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
print(n*2//math.gcd(n,2))
Problem p03835 (python)

Fixed submission:
k,s=map(int,input().split())
ans=0
for x in range(k+1):
    for y in range(k+1):
        if 0<=s-x-y<=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):
        for z in range(k+1):
            if x+y+z==s:
                ans+=1
print(ans)
Problem p02659 (python)

Fixed submission:
# -*- coding: utf-8 -*-
import numpy as np
import math

A, B = input().split()
A = int(A)
B_float = float(B)
B_int = int(B[0]+B[2:])
if B_float < 1:
    B_float = B_float*100
    C = A*B_float/100
    #C_str = str(C)
    print("{}".format(int(C)))
elif not A==0:
    C = A*B_int
    C_str = str(C)
    #iti = C_str.find('.')
    print("{}".format(int(C_str[:-2])))
elif A==0:
    print("{}".format(0))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np
import math

A, B = input().split()
A = int(A)
B_float = float(B)
B_int = int(B[0]+B[2:])
if B_float < 1:
    B_float = B_float*100
    C = A*B_float/100
    #C_str = str(C)
    print("{}".format(int(C)))
else:
    C = A*B_int
    C_str = str(C)
    #iti = C_str.find('.')
    print("{}".format(int(C_str[:-2])))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np
import math

A, B = input().split()
A = int(A)
B_float = float(B)
B_int = int(B[0]+B[2:])
if B_float < 1:
    B_float = B_float*100
    C = A*B_float/100
    #C_str = str(C)
    print("{}".format(int(C)))
else:
    C = A*B_int
    C_str = str(C)
    iti = C_str.find('.')
    print("{}".format(int(C_str[:-2])))
Problem p02688 (python)

Fixed submission:
# -*- coding: utf-8 -*-

N, K = map(int, input().split())
d = [0]*K

C = [0]*N
for i in range(K):
    d[i]=int(input())
    A=list(map(int, input().split()))
    for j in range(N):
        for k in range(d[i]):
            if A[k]==j+1:
                C[j]=1
                break

count=0
for i in range(N):
    if C[i]==0:
        count=count+1

#print("{}".format(C))
print("{}".format(count))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

N, K = map(int, input().split())
d = [0]*K

C = [0]*N
for i in range(K):
    d[i]=int(input())
    A=list(map(int, input().split()))
    for j in range(N):
        for k in range(d[i]):
            if A[k]==j+1:
                C[j]=1
                break

count=0
for i in range(N):
    if C[i]==0
    count+1


print("{}".format(count))
Problem p02707 (python)

Fixed submission:
# -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))
sheet = [0]*(N)
for i in range(N-1):
    sheet[A[i]-1]=sheet[A[i]-1]+1


for i in range(N):
    print("{}".format(sheet[i]))

Buggy submission (verdict: Runtime Error):
 -*- coding: utf-8 -*-

N = int(input())
A = list(map(int, input().split()))
sheet = [0]*(N)
for i in range(N-1):
    sheet[A[i]-1]=sheet[A[i]-1]+1


for i in range(N):
    print("{}".format(sheet[i]))
Problem p02688 (python)

Fixed submission:
N, K = input().split()
N = int(N)
K = int(K)
Sunuke = set(range(N))
for i in range(K):
  d = int(input())
  X = list(map(int, input().split()))
  for x in X:
    Sunuke.discard(x-1)
print(len(Sunuke))

Buggy submission (verdict: Runtime Error):
N, K = int(input().split())
Sunuke = set(range(N))
for i in range(K):
  d = int(input())
  X = list(map(int, input().split()))
  for x in X:
    Sunuke.discard(x-1)
print(len(Sunuke))
Problem p02695 (python)

Fixed submission:
import itertools
N, M, Q = input().split()
N = int(N)
M = int(M)
Q = int(Q)
Num = [0 for i in range(Q)]
for i in range(Q):
  Num[i] = list(map(int,input().split()))
num = list(range(1, M+1))
A = []
for v in itertools.combinations_with_replacement(num, N):
  A.append(list(v))
score = 0
for w in A:
  scoreX = 0
  for j in range(Q):
    b = Num[j][1]
    a = Num[j][0]
    if Num[j][2] == w[b-1]-w[a-1]:
      scoreX += Num[j][3]
  if scoreX > score:
    score = scoreX
print(str(score))

Buggy submission (verdict: Runtime Error):
import itertools
N, M, Q = input().split()
N = int(N)
M = int(M)
Q = int(Q)
num = [0]*Q
for i in range(Q):
  num[i] = [list(map(int,input().split()))]
num = list(range(1, M+1))
A = []
for v in itertools.combinations(num, N):
  A.append(list(v))
score = 0
for w in A:
  scoreX = 0
  for j in range(Q):
    b = num[j][1]
    a = num[j][0]
    if num[j][2] == w[b-1]-w[a-1]:
      scoreX += num[j][3]
  if scoreX > score:
    score = scoreX
print(str(score))
Problem p02712 (python)

Fixed submission:
N=int(input())
S=N//15
P=[1,2,4,7,8,11,13,14]
P2=[3,5,6,9,10,12]
Q=0
D=0
if S==0:
    for i in range(1,N+1):
        if i in P2:
            continue
        else:
            D=D+i
else:
    T=S-1
    D=(60+60+15*T*8)*S//2
    N1=N-15*S
    for i in range(1,N1+1):
        if i in P2:
            continue
        else:
            D=D+i+15*S

print(D)

Buggy submission (verdict: Runtime Error):
N=int(input())
S=N//15
R=S-1
A=60+15*8*R
T=(60+A)*S//2
M=N-15*S
P=[1,2,4,7,8,11,13,14]
P1=[]
for u in P:
    P1.append(u+15*R)

B=0
for i in range(M):
    B=B+P1[i]

print(B+T)

Buggy submission (verdict: Runtime Error):
N=int(input())
S=N//15
R=S-1
A=60+15*8*R
T=(60+A)*S//2
M=N-15*S
P=[1,2,4,7,8,11,13,14]
P1=[]
for u in P:
    P1.append(u+15*R)

B=0
for i in range(M):
    B=B+P1[i]

print(B+T)
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)
else:
    print(1)

Buggy submission (verdict: Runtime Error):
s=input()
if s=="SUN":
    print(7)
elif s=="MON":
    print(6)
elif s=="TUE":
    pirnt(5)
elif s=="WED":
    print(4)
elif s=="THU":
    print(3)
elif s=="FRI":
    print(2)
else:
    print(1)
Problem p03631 (python)

Fixed submission:
n = input()
print("Yes" if n[0] == n[2] else "No")

Buggy submission (verdict: Runtime Error):
n = int(input())
print("Yes" if n[0] == n[2] else "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 = input()
slen = len(S)
Sint = int(S)
count = 0
for i in range(slen-3):
    for j in range(i+3,slen):
        s4 = int(S[i:j+1])
        if s4 % 2019 == 0:
            count = count + 1
        
print(count)
Problem p02659 (python)

Fixed submission:
from decimal import *
n,m=input().split()
n=Decimal(n)
m=Decimal(m)
n*=m
print(Decimal(n).quantize(Decimal('1.'), rounding=ROUND_DOWN))

Buggy submission (verdict: Runtime Error):
n,m=int(input().split())
print(int(n*m))
Problem p02659 (python)

Fixed submission:
import math
a,b = map(str, input().split())
ia = int(a)
ib1,ib2 = map(int, b.split('.'))
print(math.floor(ia*ib1 + ia*ib2//100))

Buggy submission (verdict: Runtime Error):
import math
a,b,c = map(int, input().split('.'))
print(math.floor(a*b + a*c/100))
Problem p02759 (python)

Fixed submission:
import math
N = int(input())
print(math.ceil(N/2))

Buggy submission (verdict: Runtime Error):
#Input
l_A =  [[0 for i in range(3)] for j in range(3)]
l_A[0] = list(map(int, input().split()))
l_A[1] = list(map(int, input().split()))
l_A[2] = list(map(int, input().split()))

def detect_BINGO(l_Atf):
    #print(l_Atf)
    #横
    for i in range(3):
        f_detect = True
        for j in range(3):
            #print(f_detect, l_Atf[i][j])
            f_detect = f_detect and l_Atf[i][j]
        if(f_detect):
            #print("横" + str(i))
            return True
    #縦
    for i in range(3):
        f_detect = True
        for j in range(3):
            f_detect = f_detect and l_Atf[j][i]
        if(f_detect):
            #print("縦" + str(i))
            return True
    #斜
    f_detect = True
    for i in range(3):
        f_detect = f_detect and l_Atf[i][i]
    if(f_detect):
        #print("斜＼")
        return True
    f_detect = True
    for i in range(3):
        f_detect = f_detect and l_Atf[i][3-1-i]
    if(f_detect):
        #print("斜／")
        return True
    
    #BINGOなし
    return False

#Process
l_Atf = [[False for i in range(3)] for j in range(3)]
for i in range(int(input())):
    b = int(input())
    for j in range(3):
        for k in range(3):
            if(l_A[j][k] == b):
                l_Atf[j][k] = True
    #print(l_Atf)

f_bingo = detect_BINGO(l_Atf)

#Output
if(f_bingo):
    print("Yes")
else:
    print("no")

Buggy submission (verdict: Runtime Error):
import math
N = input()
print(math.ceil(N/2))
Problem p02831 (python)

Fixed submission:
import fractions
def main():
    A, B = map(int, input().split())
    ans = int(A * B / fractions.gcd(A, B))
    print(ans)
main()

Buggy submission (verdict: Runtime Error):
import math
def main():
    A, B = map(int, input().split())
    ans = int(A * B / math.gcd(A, B))
    print(ans)
main()

Buggy submission (verdict: Runtime Error):
import math
def main():
    A, B = map(int, input().split())
    ans = int(A * B / math.gcd(A, B))
    print(ans)
main()
Problem p02682 (python)

Fixed submission:
a, b, c, k = map(int, input().split())
if a >= k:
    print(k)
else:
    print(a - ((k-a)-b))

Buggy submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split())
if a >= k:
    print(k)
else:
    print(a - ((k-a)-b)

Buggy submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split())
if a >= k:
    print(a)
else:
    print(a - ((k-a)-b)
Problem p02693 (python)

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

answer = 'NG'

for i in range(a,b+1):
    if i % k == 0:
        answer = 'OK'
print(answer)

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

answer = 'NG'

for i in range(a,b):
    if i % k == 0:
        answer = 'OK'
print(answer)
Problem p02676 (python)

Fixed submission:
K = int (input())
S = (input())
if len(S) <= K:
    print(S)
else:
    print(S[:K] + '...')

Buggy submission (verdict: Runtime Error):
K = int (input())
S = (input())
if len(S) <= K:
    print(S)
else:
    print(S[:K] + '...'
Problem p02676 (python)

Fixed submission:
n=int(input())
 
s=input()
l=len(s)
if l>n:
  print(s[:n]+'...')
else:
  print(s)

Buggy submission (verdict: Runtime Error):
n=int(input())

s=input()
l=len(s)
if l>n:
  print(s[:n].join'...')
else:
  print(s)
Problem p02711 (python)

Fixed submission:
n=int(input())
s=int(n/100)
if s==7:
    print("Yes")
    exit()
elif n%10 == 7:
    print("Yes")
    exit()
elif n%100>=70 and n%100<80:
    print("Yes")
    exit()
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n=input()
s=int(n/100)
if s==7:
    print("Yes")
    exit()
elif n%10 == 7:
    print("Yes")
    exit()
elif n%100>=70 and n%100<80:
    print("Yes")
    exit()
else:
    print("No")
Problem p02712 (python)

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

Buggy submission (verdict: Runtime Error):
n = input()
ans=0
for i in range(1,n+1):
    if i%3==0 or i%5==0:
        continue
    ans+=i
print(ans)

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

Fixed submission:
n,m = map(int,input().split())
base = [int(input()) for i in range(m)]
i= 0
j = 0

dp = [0]*(n+1)
if m == 0:
  base = [n+1]

if 1 == base[j]:
  dp[1] = 0
  if j < m-1:
    j = j + 1
else:
  dp[1] = 1

dp[0] = 1

for i in range(2,n+1):
  if not (i == base[j]):
    dp[i] = dp[i-1] + dp[i-2]
  elif i == base[j]:
    if j < m-1:
      j = j + 1
  
  
print(int(dp[n]%1000000007))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
base = [int(input()) for i in range(m)]
count = 0
now = 0
i= 0
j = 0

dp = [0]*(n+1)
if 1 == base[j]:
  dp[1] = 0
  j = 1
else:
  dp[1] = 1

dp[0] = 1

for i in range(2,n+1):
  if not (i == base[j]):
    dp[i] = dp[i-1] + dp[i-2]
  elif i == base[j]:
    if j < m-1:
      j = j + 1
  
  
print(int(dp[n]%1000000007))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
base = [int(input()) for i in range(m)]
count = 0
now = 0
i= 0
j = 0

dp = [0]*(n+1)
if 1 == base[j]:
  dp[1] = 0
  if j < m-1:
    j = j + 1
else:
  dp[1] = 1

dp[0] = 1

for i in range(2,n+1):
  if not (i == base[j]):
    dp[i] = dp[i-1] + dp[i-2]
  elif i == base[j]:
    if j < m-1:
      j = j+1
  
  
print(int(dp[n]%1000000007))
Problem p02682 (python)

Fixed submission:
A,B,C,K=map(int,input().split())
#print(A,B,C,K)
#a a <A
#b b <B
#c K-a-b <C 
if K < A:
    ans=K
elif K-A <= B and K>=A:
    ans=A
else :
    ans=A-(K-A-B)
print(ans)

Buggy submission (verdict: Runtime Error):

#a a <A
#b b <B
#c K-a-b <C 
if K < A:
    ans=K
elif K-A <= B and K>=A:
    ans=A
else :
    ans=A-(K-A-B)
print(ans)