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

Fixed submission:
N = int(input())
S = {}
name_list = []
for i in range(N):
  name = input()
  if name not in S:
    S[name] = 1
    name_list.append(name)
  else:
    S[name] += 1
name_list = sorted(name_list)
max_vote_name = []
max_vote = -float('inf')
for name in name_list:
  if S[name] > max_vote:
    max_vote = S[name]
    max_vote_list = [name]
  elif S[name] == max_vote:
    max_vote_list.append(name)
for name in max_vote_list:
  print (name)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = {}
name_list = []
for i in range(N):
  name = input()
  if name not in S:
    S[name] = 1
    name_list.append(name)
  else:
    S[name] += 1
sorted(name_list)
max_vote_name = []
max_vote = -float('inf')
for name in name_list:
  if S[name] > max_vote:
    max_vote = S[name]
    max_vote_list = [name]
  else if S[name] == max_vote:
    max_vote_list.append(name)
for name in max_vote_list:
  print (name)

Buggy submission (verdict: Runtime Error):
N = int(input())
S_list = []
for i in range(N):
  S_list.append(input())
 
sorted(S_list)
name_list = []
vote_list = []
i, j = 0, 0
while i < len(S_list):
  name = S_list[i]
  while j < len(S_list) and S_list[j] == name:
    j += 1
  name_list.append(name)
  vote_list.append(j - i)
  i = j
max_vote = max(vote_list)
for k in range(name_list):
  if vote_list[k] == max_vote:
    print (name_list[k])

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

sorted(S_list)
name_list = []
vote_list = []
i, j = 0
while i < len(S_list):
  name = S_list[i]
  while j < len(S_list) and S_list[j] == name:
    j += 1
  name_list.append(name)
  vote_list.append(j - i)
  i = j
max_vote = max(vote_list)
for k in range(name_list):
  if vote_list[k] == max_vote:
    print (name_list[k])

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

sorted(S_list)
name_list = []
vote_list = []
i, j = 0
while i < len(S_list):
  name = S_list[i]
  while j < len(S_list) and S_list[j] == name:
    j += 1
  name_list.append(name)
  vote_list.append(j - i)
  i = j
max_vote = max(vote_list)
for i in range(name_list):
  if vote_list[i] == max_vote:
    print (name_list[i])
Problem p02659 (python)

Fixed submission:
from decimal import Decimal

numbers = input().split()
a = Decimal(numbers[0])
b = Decimal(numbers[1])

c = a * b

print(int(c))

Buggy submission (verdict: Runtime Error):
from decimal import Decimal

numbers = input().split()
a = float(numbers[0])
b = Decimal(numbers[1])

c = a * b

print(int(c))
Problem p02596 (python)

Fixed submission:
K = int(input())

if K % 2 == 0 or K % 5 == 0:
    print(-1)
    exit()

i = 0
ai = 0
while True:
    ai = (ai * 10 + 7) % K
    i += 1
    if ai == 0:
        break
print(i)

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

ans = 0
ai = 0

while True:
    ai = (ai*10 + 7)% k
    ans += 1
    if ai = 0:
        break
print(ans)
Problem p02623 (python)

Fixed submission:
n,m,k=map(int,input().split())
arr1=list(map(int,input().split()))
arr2=list(map(int,input().split()))
acum1=[0]
for i in range(n): #累積和ai,bjを求める
 acum1.append(acum1[-1]+arr1[i])
acum2=[0]
for i in range(m):
 acum2.append(acum2[-1]+arr2[i])
ans=0
j=m
for i in range(n+1):
 if acum1[i]>k: #ai>Kであれば、どのようにjを選んでもai+bj<=Kとなることはないので探索を終了する
   break
 while acum2[j]>k-acum1[i] and j>0: #各iについて、bj<=K-aiを満たす最大のjを求める
   j-=1
 ans=max(ans,i+j)
print(ans)

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

count = 0
while k > 0:
    for i in range(n+m):
        if len(a) == 0:
            if len(b) == 0:
                k = 0
                break
            elif k >= b[0]:
                btop = b.pop(0)
                k -= btop
                count += 1
            else:
                k = 0
                break
        elif len(b) == 0:
            if len(a) == 0:
                k = 0
                break
            elif k >= a[0]:
                btop = a.pop(0)
                k -= atop
                count += 1
            else:
                k = 0
                break
                
        elif a[0] > k and b[0] > k:
            k = 0
            break
        elif b[0] >= a[0]:
            atop = a.pop(0)
            k -= atop
            count += 1
        elif a[0] > b[0]:
            btop = b.pop(0)
            k -= btop
            count += 1

print(count)

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

count = 0
while k > 0:
    for i in range(n+m):
        if a[0] > k and b[0] > k:
            k = 0
            break
        elif b[0] >= a[0]:
            atop = a.pop(0)
            k -= atop
            count += 1
        elif a[0] > b[0]:
            btop = b.pop(0)
            k -= btop
            count += 1

print(count)
Problem p02629 (python)

Fixed submission:
def alpha2num(alpha):
    num=0
    for index, item in enumerate(list(alpha)):
        num += pow(26,len(alpha)-index-1)*(ord(item)-ord('A')+1)
    return num

def num2alpha(num):
    if num<=26:
        return chr(64+num)
    elif num%26==0:
        return num2alpha(num//26-1)+chr(90)
    else:
        return num2alpha(num//26)+chr(64+num%26)

n=int(input())

s = num2alpha(n)
print(s.lower())

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

n_rem = n
ans = ""

while True:
    x = n_rem%26
    if x == 0:
        x = 26
    ans += chars[x]

    n_rem -= x

    if n_rem == 0:
        break

    n_rem //==26

print(ans[::-1])
Problem p02659 (python)

Fixed submission:
a,b=map(str, input().split())
A = int(a)
B = 100*int(b[0])+10*int(b[2])+ 1*int(b[3])
ans = A*B // 100
print(ans)

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

ans = 1
if 0 in a:
    ans = 0
    print(ans)
    exit()
else:
    for i in a:
        ans *= i
        if ans > 10**18:
            print(-1)
            exit()
print(ans)

Buggy submission (verdict: Runtime Error):
a,b=map(str, input().split())
A = int(a)
B = 100*int(b[0])+10*int(b[1])+int(b[2])
ans = A*B / 100
print(int(ans))
Problem p02693 (python)

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

print("OK" if a <= b//k*k else "NG")

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

while True:
    if a%k == 0:
        print("OK")
        break
    elif: b%k == 0:
        print("OK")
    elif b-a >= k:
        print("OK")
        break
    else:
        print("NG")
        break
Problem p02820 (python)

Fixed submission:
n, k = map(int, input().split())
r, s, p = map(int, input().split())
T=list(input())

commands = [""]*n
ans = 0

for i, t in enumerate(T):
    if t == "p":
        command = "s"
        point = s
    elif t == "s":
        command = "r"
        point = r
    elif t == "r":
        command = "p"
        point = p

    if(i - k) >= 0 and (commands[i-k] == command):
        command = ""
        point = 0

    ans += point
    commands[i] = command
print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
r, s, p = map(int, input().split())
T=list(input())

commands = [""]*n
ans = 0

for i, t in enumerate(T):
    if t == "p":
        point = s
    elif t == "s":
        point = r
    elif t == "r":
        point = p

    if(i - k) >= 0 and (commands[i-k] == command):
        point = 0

    ans += point
print(ans)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
r, s, p = map(int, input().split())
T=list(input())

commands = [""]*n
ans = 0

for i, t in enumerate(T):
    if t == "p":
        point = s
    elif t == "s":
        point = r
    elif t == "r":
        point = p

    if(i - k) >= 0 and (commands[i-k] == command):
        point = 0

    ans += point
print(ans)
Problem p02571 (python)

Fixed submission:
S = str(input())
T = str(input())
mini = []

if len(S) != len(T):
    for i in range(len(S) - len(T)):
        count = 0
        for j in range(len(T)):
            if T[j] == S[j+i]:        
                count+=1
        mini.append(len(T) - count)
    print(min(mini))
else:
    count = 0
    for i in range(len(S)):
       if T[i] == S[i]:
           count+=1
    print(len(T) - count)

Buggy submission (verdict: Runtime Error):
S = str(input())
T = str(input())
mini = []
for i in range(len(S) - len(T)):
    count = 0
    for j in range(len(T)-1):
        if T[j] == S[j+i]:        
            count+=1
    mini.append(len(T) - count)
print(min(mini))

Buggy submission (verdict: Runtime Error):
S = str(input())
T = str(input())
fg = 0
mini = []
for i in range(len(S) - len(T)):
    count = 0
    for j in range(len(T)):
        if T[j] == S[j+i]:        
            count+=1
    mini.append(len(T) - count)
print(min(mini))
Problem p02753 (python)

Fixed submission:
s = input()
fg = 0
for i in range(2):
    if s[i] != s[i+1]:
        fg = 1
if fg == 1:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import math

a , b = map(int , input().split())

for i in range(10000):
    if math.floor(i * 0.08) == a and math.floor(i* 0.1) == b:
        print(i)
        break

print(-1)
Problem p02933 (python)

Fixed submission:
a = int(input())
s = input()

if a >= 3200:
	print(s)
else:
  	print("red")

Buggy submission (verdict: Runtime Error):
a = int(input())
s = input()

if a >= 3200
	print("red")
else:
  	print(s)
Problem p03127 (python)

Fixed submission:
import functools
import math
import fractions

N = int(input())
A = list(map(int, input().split()))
         
a = functools.reduce(fractions.gcd, A)
print(a)

Buggy submission (verdict: Runtime Error):
import functools
import math

N = int(input())
A = list(map(int, input().split()))
         
gcd = functools.reduce(math.gcd, A)
print(gcd)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
         
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

print(gcd_list(A))

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
         
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

print(gcd_list(A))
# 3

Buggy submission (verdict: Runtime Error):

N = int(input())
A = list(map(int, input().split()))
         
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

print(gcd_list(A))
# 3

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

mod = A[-1] % A[-2]

print(A[0] - mod)
Problem p03317 (python)

Fixed submission:
N , K = (int(i) for i in input().split())
A = list(int(i) for i in input().split())
 
count = 1
s  = K
 
while s < N:
    s = s + (K - 1)
    count = count + 1
    #print(s)
print(count)

Buggy submission (verdict: Runtime Error):
N , K = (int(i) for i in input().split())
A = list(int(i) for i in range(input().split(),N))

count = 1
s  = K

while s < N:
    s = s + (K - 1)
    count = count + 1
    print(s)
print(count)
Problem p02759 (python)

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

Buggy submission (verdict: Runtime Error):
import math
print(math.ceil(int(input())/2)
Problem p02779 (python)

Fixed submission:
N = int(input())
aa = map(int, input().split())
if len(set(aa)) != N:
  print('NO')
else:
  print('YES')

Buggy submission (verdict: Runtime Error):
N = int(input())
aa = map(int, input().split())
if len(set(aa)) != N:
  print('NO')
else:
  print('YES)
Problem p02570 (python)

Fixed submission:
d,t,s = map(int,input().split())
if d <= t*s:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
d,t,s = map(int,input().split())
if d <= t*s{
  print("Yes")
}
else{
  print("No")

}
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 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())

ans1 = 0
while a>=0:
    a -= d
    ans1 += 1

ans2 = 0
while c >= 0:
    c -= b
    ans2 += 1

if ans1 >= ans2:
    print("No")
else:
    print("Yes")

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

ans1 = 0
while a>=0:
    a -= d
    ans1 += 1

ans2 = 0
while c >= 0:
    c -= b
    ans2 += 1

if ans1 >= ans2:
    print("Yes")
else:
    print("No")
Problem p02711 (python)

Fixed submission:
a = input()
ans = a.count("7")
if ans==0:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
n =input()
if "7" in n:
  prnt("Yes")
else:
  print("No")
Problem p02723 (python)

Fixed submission:
s = input()
if s[2]==s[3] and s[4]==s[5]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a = input()
if a[2]==a[3] and a[4]==a[5]:
           print("Yes")
           
esle:
           print("No")

Buggy submission (verdict: Runtime Error):
a = input()
if a[2]==a[[3] and a[4]==a[5]:
           print("Yes")
           
esle:
           print("No")
Problem p02725 (python)

Fixed submission:
k, n = map(int,input().split())
a = [int(x) for x in input().split()]
b = []
for i in range(n-1):
    b.append(a[i+1]-a[i])
b.append(a[0] + k - a[n-1])

print(k - max(b))

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

print(k - max(b))
Problem p02572 (python)

Fixed submission:
n= int(input())
a= [int(i) for i in input().split()]
pref=[0]*n
m = 10**9+7
pref[0] = a[0]%m
for i in range(1,n):
    pref[i] =  (pref[i-1]+a[i])%m
m = 10**9+7
ans = 0
#print(pref)
for i in range(n-1):
    ans+= (a[i]%m *((pref[n-1]-pref[i])%m))%m
    ans = ans%m
print(ans)

Buggy submission (verdict: Runtime Error):
n= int(input())
a= [int(i) for i in input().split()]
pref=[0]*n
pref[0] = a[0]%m
for i in range(1,n):
    pref[i] =  (pref[i-1]+a[i])%m
m = 10**9+7
ans = 0
#print(pref)
for i in range(n-1):
    ans+= (a[i]%m *((pref[n-1]-pref[i])%m))%m
    ans = ans%m
print(ans)
#437235829
Problem p02572 (python)

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

A_sum = sum(A)

value = 0
ans = 0

for i in range(N-1):
    A_sum -= A[i]
    value += A[i]*A_sum

ans = value % (1*10**9+7)

print(ans)

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

A = A % (1*10**9 + 7)
value = 0
plus = 0
ans = 0

for i in range(N-1):
    for j in range(N-i-1):
        value = (A[i]*A[i+j+1]+value) % (1*10**9 + 7)
        

print(value)
Problem p02596 (python)

Fixed submission:
K = int(input())

N = 0
count = -1

for i in range(K):
    N = (N*10+7)%K
    if N == 0:
        count = i+1
        break
    
print(count)

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

if K%2 == 0 or K%5 ==0:
    print(-1)
    sys.exit()
    
N = 7
count = 0
i = 1

while i:
    
    count += 1
    if N % K == 0:
        print(count)
        sys.exit()
    N = N*10 + 7
Problem p02622 (python)

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

Num = len(S)

S = list(S)
T = list(T)

change_num = 0

for i in range(Num):
    if S[i] is not T[i]:
        change_num += 1

print(change_num)

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

A = A.splitlines()

change_num = 0

Num = len(A[0])

S = list(A[0])
T = list(A[1])

for i in range(Num):
    if S[i] is not T[i]:
        change_num += 1

print(change_num)
Problem p02753 (python)

Fixed submission:
def resolve():
    S = input()
    print("No" if S in ["AAA", "BBB"] else "Yes")

if '__main__' == __name__:
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    import math
    print(math.ceil(N/2))

if '__main__' == __name__:
    resolve()
Problem p02925 (python)

Fixed submission:
def resolve():
    N = int(input())
    A = []
    for _ in range(N):
        _a = list(map(lambda x: int(x)-1, input().split()))
        A.append(_a)
    ptrs = [0 for _ in range(N)]
    day = 0
    players = set([i for i in range(N)])
    finished = set()
    yest_players = set([i for i in range(N)])
    while True:
        todays_players = set()
        matched = False
        if len(finished) == N:
            break
        #print("------")
        for home in yest_players:
            if home in finished:
                continue
            away = A[home][ptrs[home]]
            if away in finished:
                continue
            #print(home, away)
            away_opp = A[away][ptrs[away]]
            if home in todays_players or away in todays_players:
                continue
            if home == away_opp:
                ptrs[home] += 1
                ptrs[away] += 1
                todays_players.add(home)
                todays_players.add(away)
                matched = True
                if ptrs[home] == N-1:
                    finished.add(home)
                if ptrs[away] == N-1:
                    finished.add(away)
        yest_players = todays_players
        #print(ptrs)
        if matched:
            day += 1
        else:
            day = -1
            break
    print(day)





if '__main__' == __name__:
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    A = []
    for _ in range(N):
        _a = list(map(lambda x: int(x)-1, input().split()))
        A.append(_a)
    ptrs = [0 for _ in range(N)]
    day = 0
    players = set([i for i in range(N)])
    finished = set()
    loops = 0
    yest_players = set([i for i in range(N)])
    while loops < 10**5:
        todays_players = set()
        matched = False
        if len(finished) == N:
            break
        #print("------")
        for home in yest_players:
            if home in finished:
                continue
            away = A[home][ptrs[home]]
            if away in finished:
                continue
            #print(home, away)
            away_opp = A[away][ptrs[away]]
            if home in todays_players or away in todays_players:
                continue
            if home == away_opp:
                ptrs[home] += 1
                ptrs[away] += 1
                todays_players.add(home)
                todays_players.add(away)
                matched = True
                if ptrs[home] == N-1:
                    finished.add(home)
                if ptrs[away] == N-1:
                    finished.add(away)
        yest_players = todays_players
        #print(ptrs)
        if matched:
            day += 1
        else:
            day = -1
            break
        loops += 1
    assert loops < 10**5, "error"
    print(day)





if '__main__' == __name__:
    resolve()
Problem p03013 (python)

Fixed submission:
def resolve():
    (N, M) = list(map(int, input().split(" ")))
    As = [int(input()) for i in range(M)]
    As.sort()

    cnts = [False] * (N+1)
    ptr = 0
    for i in range(N+1):
        c = 0
        if ptr < len(As) and i == As[ptr]:
            c = 0
            ptr = ptr + 1
        elif i == 0:
            c = 1
        elif i == 1:
            c = 1
        elif i == 2:
            c = 2 if 1 not in As else 1
        else:
            c = (cnts[i-2] + cnts[i-1])%1000000007
        cnts[i] = c

    print(cnts[N])

if '__main__' == __name__:
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    (N, M) = list(map(int, input().split(" ")))
    As = [int(input()) for i in range(M)]
    mems = [False] * (N+1)

    def rec(target):
        if target in As:
            return 0
        
        if target == 1:
            return 1
        
        if target == 2:
            return 2 if 1 not in As else 1

        if not mems[target]:
            one = rec(target-1)
            two = rec(target-2)
            mems[target] = one + two
        
        return mems[target]
    
    print(rec(N)%1000000007)

if '__main__' == __name__:
    resolve()
Problem p03107 (python)

Fixed submission:
def resolve():
    S = input()
    zeros = S.count("0")
    print(min(zeros, len(S)-zeros)* 2)

if '__main__' == __name__:
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    S = int(input())
    zeros = S.count("0")
    print(min(zeros, len(zeros)*2)

if '__main__' == __name__:
    resolve()
Problem p03252 (python)

Fixed submission:
def resolve():
    S = input()
    T = input()
    smap = {}
    tmap = {}
    for i in range(len(S)):
        if S[i] in smap: 
            if smap[S[i]] != T[i]:
                print("No")
                return
        else:
            smap[S[i]] = T[i]
        
        if T[i] in tmap: 
            if tmap[T[i]] != S[i]:
                print("No")
                return
        else:
            tmap[T[i]] = S[i]

    print("Yes")
    return


if '__main__' == __name__:
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    S = input()
    T = input()
    chmap = {}
    # 2つのアルファベットを選んで入れ替えるという操作を何回繰り返しても、
    # 必ずalphabet26文字は自分以外のalphabetと一対一に対応し重複しない
    for i in range(len(S)):
        if S[i] != T[i]:
            if S[i] in chmap: 
                if chmap[S[i]] != T[i]:
                    print("No")
                    return
            else:
                chmap[S[i]] = T[i]

    import collections
    chmapMosts = collections.Counter(chmap.values()).most_common()
    if chmapMosts[0][1] > 1:
        print("No")
        return
    
    print("Yes")
    return


if '__main__' == __name__:
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    S = input()
    T = input()
    chmap = {}
    # 2つのアルファベットを選んで入れ替えるという操作を何回繰り返しても、
    # 必ずalphabet26文字は自分以外のalphabetと一対一に対応し重複しない
    for i in range(len(S)):
        if S[i] != T[i]:
            if S[i] in chmap: 
                if chmap[S[i]] != T[i]:
                    print("No")
                    return
            else:
                chmap[S[i]] = T[i]

    import collections
    chmapMosts = collections.Counter(chmap.values()).most_common()
    if chmapMosts[0][1] > 1:
        print("No")
        return
    
    print("Yes")
    return


if '__main__' == __name__:
    resolve()
Problem p03272 (python)

Fixed submission:
N, i = map(int, input().split(" "))
print(N - i + 1)

Buggy submission (verdict: Runtime Error):
N, i = map(int, input().split(" "))
return N - i + 1
Problem p02699 (python)

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

Buggy submission (verdict: Runtime Error):
S = input()
l = len(S)
count = 0
for i in range(4,l+1):
  for j in range(l-i+1):
    if float(S[j:j+i]) % 2019 == 0:
      count += 1
print(count)
Problem p02711 (python)

Fixed submission:
N = input()
flag = 0
for i in range(len(N)):
  if int(N[i]) == 7:
    flag = 1
if flag == 1:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
count = 0
for i in range(N+1):
  if i % 3 != 0 and i % 5 != 0:
  print(i)
print(count)

Buggy submission (verdict: Runtime Error):
N = input()
for i in range(len(N)):
  if int(N[i]) == 7:
    flag = 1
if flag == 1:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
N = input()
for i in range(len(N)):
  if N[i] == 7;
	flag = 1
if flag = 1:
  print('Yes')
else:
  print('No')