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

Fixed submission:
#C
import itertools
N,M = map(int,input().split())
AB = [list(map(int,input().split())) for i in range(M)]

path = [(i+1) for i in range(N)]
p_list = list(itertools.permutations(path,N))

ans = 0
for pl in p_list:
    if pl[0] == 1:
        flag = 0
        for i in range(N-1):
            ab1 = [pl[i],pl[i+1]]
            ab2 = [pl[i+1],pl[i]]
            if ab1 in AB or ab2 in AB:
                pass
            else:
                flag = 1
                break
        if flag == 0:
            ans+=1
            
print(ans)

Buggy submission (verdict: Runtime Error):
#C問題
N,M = map(int,input().split())
ab=[list(map(int,input().split())) for i in range(M)]
reach=[-1]*(N)
reach[0]=0
ans=0
def cdfs(n):
    global ans
    global reach
    if sum(reach)==0:
        ans+=1
        reach=[-1]*(N)
        reach[0]=0
        return
    else:
        for j in range(N):
            if reach[j] == -1 and ([n+1,j+1] in ab or [j+1,n+1] in ab):
                reach[j] = 0
                cdfs(j)
                reach[j] = -1
            else:
                pass
        return
reach[0]=0
cdfs(0)
print(ans)
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):
s=input()
if s[2]=s[3] and s[4]=s[5]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
s=input()
if s[2]=s[3]ands[4]=s[5]:
    print("Yes")
else:
    print("No")
Problem p02987 (python)

Fixed submission:
four = input()
four_set = set(four)

if len(four_set) != 2:
    print("No")
else:
    if four.count(list(four_set)[0]) != 2:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
four = input()
four_set = set(four)

if len(four_set) != 2:
  print("No")
else:
  if four.count(four_set[0]) != 2:
    print("No")
  else:
    print("Yes")
Problem p02699 (python)

Fixed submission:
nums = input()
S = int(nums.split(' ')[0])
W = int(nums.split(' ')[1])

if W >= S:
	print('unsafe')
else:
	print('safe')

Buggy submission (verdict: Runtime Error):
nums = input()
S = int(nums.split(' ')[0])
W = int(nums.split(' ')[1])

if W >= S:
	print(unsafe)
else:
	print('safe')
Problem p02729 (python)

Fixed submission:
from scipy.misc import comb
n=[int(i) for i in input().split()]
a=comb(n[0],2,exact=True)
b=comb(n[1],2,exact=True)
print(a+b)

Buggy submission (verdict: Runtime Error):
from scipy.special import comb
n=[int(i) for i in input().split()]
a=comb(n[0],2,exact=True)
b=comb(n[1],2,exact=True)
print(a+b)
Problem p02773 (python)

Fixed submission:
n = int(input())
s = [input() for _ in range(n)]
d = {}
for w in s:
    if w not in d:
        d[w] = 0
    d[w] += 1
d2 = sorted(d.items(), key=lambda x:x[1], reverse=True)
maxcnts = [w[0] for w in d2 if w[1] == d2[0][1]]
maxcnts.sort()
for ans in maxcnts:
    print(ans)

Buggy submission (verdict: Runtime Error):
from collections import Counter

n=int(split())
l=[input() for i in range(n)]
c=Counter(l)
d=max(c.values())
max_list=[k for k,v in c.items() if v==d]
max_list.sort()
for j in max_list:
  print(j)

Buggy submission (verdict: Runtime Error):
from collections import Counter

n=int(open(0).readline())
l=open(0).read().split()
c=Counter(l)
max_list=[kv[0] for kv in c.items() if kv[1]==max(c.values())]
max_list.sort()
for j in max_list:
  print(j.strip())
Problem p02819 (python)

Fixed submission:
import math
x=int(input())
def prime(n):
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            return False
    return True
for i in range(x,2**64):
    if prime(i)==True:
        print(i)
        break

Buggy submission (verdict: Runtime Error):
from sympy import isprime
x=int(input())
for i in range(x,2**64):
    if isprime(i)==True:
        print(i)
        break
Problem p02699 (python)

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

Buggy submission (verdict: Runtime Error):
numbers = input().split(" ")
healthOfT = int(numbers[0])
strengthOfT = int(numbers[1])
healthOfA = int(numbers[2])
strengthOfA = int(numbers[3])
for i in(0,1000):
	healthOfA=healthOfA-strengthOfT
	if healthOfA<=0:
		a=i
		break
for p in(0,1000):
	healthOfT=healthOfT-strengthOfA
	if healthOfT<=0:
		break
if p<i:
	print("No")
else:
	print("Yes")
Problem p02711 (python)

Fixed submission:
n = list(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 p02735 (python)

Fixed submission:
def flip_count_mem(r, c):
  if memory[r][c] < 0:
    memory[r][c] = flip_count(r, c)
  return memory[r][c]

def flip_count (r, c):
  if r == H - 1 and c == W - 1:
    if s[r][c] == "#":
      return 1
    else:
      return 0
  #右に行ったとき
  if c == W - 1:
    count_right = 10000
  else:
    count_right = flip_count_mem (r, c + 1)
    if s[r][c] == "#" and s[r][c + 1] == ".":
      count_right += 1
  #下に行ったとき
  if r == H - 1:
    count_down = 10000
  else:
    count_down = flip_count_mem (r + 1, c)
    if s[r][c] == "#" and s[r + 1][c] == ".":
      count_down += 1
  return min(count_right, count_down)

H, W = input().split()
W = int (W)
H = int (H)
s = []
for i in range(H):
  s.append(input())
memory = [[-1 for i in range(W)] for j in range(H)]
print (flip_count(0, 0))

Buggy submission (verdict: Runtime Error):
memory = [[-1 for i in range(W)] for j in range(H)]
def flip_count_mem(r, c):
  if memory[r][c] < 0:
    memory[r][c] = flip_coumt(r, c)
  return memory[r][c]

def flip_count (r, c):
  if r == H - 1 and c == W - 1:
    if s[r][c] == "#":
      return 1
    else:
      return 0
  #右に行ったとき
  if c == W - 1:
    count_right = 10000
  else:
    count_right = flip_count_mem (r, c + 1)
    if s[r][c] == "#" and s[r][c + 1] == ".":
      count_right += 1
  #下に行ったとき
  if r == H - 1:
    count_down = 10000
  else:
    count_down = flip_count_mem (r + 1, c)
    if s[r][c] == "#" and s[r + 1][c] == ".":
      count_down += 1
  return min(count_right, count_down)

H, W = input().split()
W = int (W)
H = int (H)
s = []
for i in range(H):
  s.append(input())
print (flip_count(0, 0))
Problem p02897 (python)

Fixed submission:
v=int(input())
if (v % 2 == 0):
    print 0.5
else:
    print (v/2+1.0)/v

Buggy submission (verdict: Runtime Error):
s = raw_input().split()
[N, K] = s
N = int(N)
K = int(K)
#print N, K

s = raw_input().split()
#print s
h = [0]*N

for i in range(N):
    h[i] = int(s[i])
    #print h[i]

h.sort(reverse=True)
#print h

for i in range(N):
    if (h[i] >= K):
        continue
    else:
        print i
        exit()

print N
Problem p02695 (python)

Fixed submission:
import itertools
n, m, q = list(map(int,input().split()))
sets = [list(map(int,input().split())) for i in range(q)]
#print(sets)
mx = 0
nums = list(range(1,m+1))
for h in itertools.combinations_with_replacement(nums,n):
    mxtemp = 0
    for j in range(q):
        a = sets[j][0]
        b = sets[j][1]
        if list(h)[b-1] - list(h)[a-1] == sets[j][2]:
            mxtemp += sets[j][3]
    if mxtemp > mx:
        mx = mxtemp
print(mx)

Buggy submission (verdict: Runtime Error):
import itertools
n, m, q = list(map(int,input().split()))
sets = [list(map(int,input().split())) for i in range(q)]
mx = 0
nums = list(range(1,m+1))
for h in itertools.combinations_with_replacement(nums,n):
    mxtemp = 0
    for j in range(q):
        a = sets[q][0]
        b = sets[q][1]
        if list(h)[b-1] - list(h)[a-1] == sets[q][2]:
            mxtemp += sets[q][3]
    if mxtemp > mx:
        mx = mxtemp
print(mx)

Buggy submission (verdict: Runtime Error):
import itertools
n, m, q = list(map(input().split()))
sets = [list(map(int,input().split())) for i in range(q)]
mx = 0
nums = list(range(1,n+1))
for h in itertools.combinations_with_replacement(nums,n):
    mxtemp = 0
    for j in range(q):
        a = sets[q][0]
        b = sets[q][1]
        if list(h)[b-1] - list(h)[a-1] == sets[q][2]:
            mxtemp += sets[q][3]
    if mxtemp > mx:
        mx = mxtemp
print(mx)

Buggy submission (verdict: Runtime Error):
import itertools
n, m, q = list(map(input().split()))
sets = [list(map(int,input().split())) for i in range(q)]
mx = 0
nums = list(range(1,11))
for h in itertools.combinations_with_replacement(nums,10):
    mxtemp = 0
    for j in range(q):
        a = sets[q][0]
        b = sets[q][1]
        if list(h)[b-1] - list(h)[a-1] == sets[q][2]:
            mxtemp += sets[q][3]
        if mxtemp > mx:
            mx = mxtemp
print(mx)
Problem p03186 (python)

Fixed submission:
a, b, c = list(map(int, input().split()))
if a + b >= c - 1:
    print(b+c)
else:
    print(a+2*b+1)

Buggy submission (verdict: Runtime Error):
a, b, c = list(map(int, input().split()))
if a + b >= c - 1:
    print(b+c)
else:
    print(a+2b+1)
Problem p03250 (python)

Fixed submission:
a, b, c = list(map(int, input().split()))
if a >= b and a >= c:
    print(10*a + b + c)
elif b >= a and b >= c:
    print(10*b + a + c)
else:
    print(10*c + a + b)

Buggy submission (verdict: Runtime Error):
a, b, c = list(map(int, input().split()))
if a >= b && a >= c:
    print(10*a + b + c)
elif b >= a && b >= c:
    print(10*b + a + c)
else:
    print(10*c + a + b)
Problem p02676 (python)

Fixed submission:
#!/usr/bin/env python3

import sys

def solve(K: int, S: str):
    if (len(S) <= K):
        print(S)
    else:
        print(S[0:K], "...", sep='')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(K, S)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys


def solve(K: int, S: str):
    if (len(S) <= K):
        print(S)
    else:
        print(K[0:K+1], "...", sep='')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(K, S)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import sys


def solve(K: int, S: str):
    if (len(S) <= K):
        print(S)
    else:
        print(K[0:K+1], "...", sep='')
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    K = int(next(tokens))  # type: int
    S = next(tokens)  # type: str
    solve(K, S)

if __name__ == '__main__':
    main()
Problem p02754 (python)

Fixed submission:
def count_balls(n, b, a):
	if b == 0:
		return 0
	
	num = n // (a + b)
	mod = n % (a + b)
	if mod != 0:
		if mod < b:
			return num * b + mod
		else:
			return num * b + b
	else:
		return num * b

n, b, a = map(int, input().split())
print(count_balls(n, b, a))

Buggy submission (verdict: Runtime Error):
n, b, a = map(int, input().split())
print(n // (a + b) * b + min(n % (a + b), b)
Problem p02879 (python)

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

if A <= 9:
  if B <= 9:
    x = A*B
  else:
    x = -1
else:
  x = -1

print(x)

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

if A =< 9:
  if B =< 9:
    x = A*B
  else x = -1
else x = -1

print(x)
Problem p03041 (python)

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

#print(N,K,S)

s = S[K-1]
#print(s)
s_large = s.lower()
#print(s_large)

S[K-1] = s_large
print(''.join(S))

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

s = S(K)
s_large = s.upper()

S = [s_large if s=S(K) else 0 for s in S]
Problem p02762 (python)

Fixed submission:
n, m, k = map(int, input().split())
friendships = [[] for _ in range(n)]
for _ in range(m):
  a, b = map(int, input().split())
  friendships[a-1].append(b-1)
  friendships[b-1].append(a-1)
blockships = [[] for _ in range(n)]
for _ in range(k):
  c, d = map(int, input().split())
  blockships[c-1].append(d-1)
  blockships[d-1].append(c-1)
# assign users (id) for connected component, according to friendships
# also increment a counter for size of each component
component_id = [-1]*n
component_size = dict()
stack_to_visit = [(node, node) for node in range(n)]
while stack_to_visit:
  node, parent_id = stack_to_visit.pop()
  if component_id[node] != -1:
    continue
  component_id[node] = parent_id
  component_size[parent_id] = component_size.get(parent_id, 0) + 1
  for other in friendships[node]:
    stack_to_visit.append((other, parent_id))
# calculate number of suggestions for each node
for node in range(n):
  suggestions = 0
  current_id = component_id[node]
  suggestions += component_size[current_id] - 1
  suggestions -= len(friendships[node])
  suggestions -= sum(int(component_id[other] == current_id) for other in blockships[node])
  print(suggestions, end=" ")

Buggy submission (verdict: Runtime Error):
n, m, k = map(int, input().split())
friendships = [[] for _ in range(n)]
for _ in range(m):
  a, b = map(int, input().split())
  friendships[a-1].append(b-1)
  friendships[b-1].append(a-1)
blockships = [[] for _ in range(n)]
for _ in range(k):
  c, d = map(int, input().split())
  blockships[c-1].append(d-1)
  blockships[d-1].append(c-1)
# assign users (id) for connected component, according to friendships
# also increment a counter for size of each component
component_id = [-1]*n
component_size = dict()
def search(node, parent_id):
  if component_id[node] != -1:
    return
  component_id[node] = parent_id
  component_size[parent_id] = component_size.get(parent_id, 0) + 1
  for other in friendships[node]:
    search(other, parent_id)
for initial_node in range(n):
  search(initial_node, initial_node)
# calculate number of suggestions for each node
for node in range(n):
  suggestions = 0
  current_id = component_id[node]
  suggestions += component_size[current_id] - 1
  suggestions -= len(friendships[node])
  suggestions -= sum(int(component_id[other] == current_id) for other in blockships[node])
  print(suggestions, end=" ")
Problem p02779 (python)

Fixed submission:
N = int(input())
A = input().split()
if len(A) != len(set(A)):
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
def check_all_distinct(A):
  already_seen_chars = list()
  for character in A:
    if character not in already_seen_chars:
      already_seen_chars.append(character)
      print(already_seen_chars)
    else: return "NO"
  return "YES"


if __name__ == "__main__":
  N = int(input())
  A = input().split()
  print(check_all_distinct(A))
Problem p02790 (python)

Fixed submission:
def repeat_string(x, y):
    """Return the digit x repeated y times."""
    single_string = str(x)
    repeat_string = single_string*y
    return repeat_string


def compare_strings(a, b):
    if a>b: return(repeat_string(b, a))
    return(repeat_string(a, b))


if __name__ == "__main__":
    test1 = "4 3"
    test2 = "7 7"
    test = test2
    test_input = map(int, input().split())
    print(compare_strings(*test_input))

Buggy submission (verdict: Runtime Error):
def repeat_string(x, y):
    """Return the digit x repeated y times."""
    single_string = str(x)
    repeat_string = single_string*y
    return repeat_string


def compare_strings(a, b):
    if a>b: return(repeat_string(b, a))
    return(repeat_string(a, b))


if __name__ == "__main__":
    test1 = "4 3"
    test2 = "7 7"
    test = test2
    test_input = map(int, intput().split())
    print(compare_strings(*test_input))
Problem p02676 (python)

Fixed submission:
k = int(input())
s = str(input())
e = int(len(s))

if k < e:
  print(s[0:k]+'.'*3)
else:
  print(s)

Buggy submission (verdict: Runtime Error):
k = int(input())
s = str(input())
e = len(s)

if k < int(len(s)):
  print(n[0:int(e-k)-1]+'.'*3)
else:
  print(s)
Problem p02693 (python)

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

if A == B:
    if A % K == 0:
        print('OK')

    elif B % K == 0:
        print('OK')

    else:
        print('NG')

else:
    for i in range(B-A+1):
        i += A
        if i % K == 0:
            print('OK')
            break

    else:
        print('NG')

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

if A == B:
    if A % K == 0:
        print('OK')
    else:
        print('NG')

else:
    for i in range(B-A):
        i += A
        if i % K == 0:
            print('OK')
            break

    else:
        print('NG')
Problem p02831 (python)

Fixed submission:
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

Buggy submission (verdict: Runtime Error):
num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)

Buggy submission (verdict: Runtime Error):
num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)

Buggy submission (verdict: Runtime Error):
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))
Problem p02832 (python)

Fixed submission:
num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)

Buggy submission (verdict: Runtime Error):
num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -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(s)
else:
  print(red)
Problem p02729 (python)

Fixed submission:
import math
N, M = list(map(int, input().split()))
if N==M==1:
    print(0)
elif M < 2:
    print(int(math.factorial(N)/math.factorial(2)/math.factorial(N-2)))
elif N==0:
    print(int(math.factorial(M)/math.factorial(2)/math.factorial(M-2)))
else:
    print(int(math.factorial(N)/math.factorial(2)/math.factorial(N-2) +  math.factorial(M)/math.factorial(2)/math.factorial(M-2)))

Buggy submission (verdict: Runtime Error):
import math
N, M = list(map(int, input().split()))
if N==M==1:
    print(1)
elif M < 2:
    print(int(math.factorial(N)/math.factorial(2)/math.factorial(N-2)))

else:
    print(int(math.factorial(N)/math.factorial(2)/math.factorial(N-2) +  math.factorial(M)/math.factorial(2)/math.factorial(M-2)))
Problem p02753 (python)

Fixed submission:
S = str(input())
if S == 'AAA' or S=='BBB':
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
√çS = str(input())
if S == 'AAA' or S=='BBB':
    print('No')
else:
    print('Yes')
Problem p02831 (python)

Fixed submission:
import fractions
X,Y = map(int, input().split())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
print(lcm(X,Y))

Buggy submission (verdict: Runtime Error):
import fraction 
X,Y = map(int, input().split())
def lcm(x, y):
    return (x * y) // fraction.gcd(x, y)
print(lcm(X,Y))

Buggy submission (verdict: Runtime Error):
import math 
X,Y = map(int, input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(X,Y))
Problem p02881 (python)

Fixed submission:
def devide2two(n):
    arr=[]
    arr.append((n-1))
    for i in range(2, int(-(-n**0.5//1))+1):
        if n%i==0:
            a = n/i
            arr.append(i-1+ a-1)
    
    return min(arr)
n = int(input())
print(int(devide2two(n)))

Buggy submission (verdict: Runtime Error):
def devide2two(n):
    arr=[]
    arr.append((n-1))
    for i in range(2, int(-(-n**0.5//1))+1):
        if n%i==0:
            a = n/i
            arr.append(i-1+ a-1)
    
    return min(arr)
n = input()
print(devide2two(n))
Problem p03041 (python)

Fixed submission:
N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
print("".join(S))

Buggy submission (verdict: Runtime Error):
N, K = map(int, input().split())
S = list(input().split())
S[K-1] = S[K-1].lower()
print("".join(S))
Problem p02712 (python)

Fixed submission:
n = int(input())
s = 0
for  i  in range(1,n+1):
  if i % 3 != 0 and i % 5 != 0:
    s += i
print(s)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = 0
for  i  in range(1,N+1):
  if i % 3 != 0 and i % 5 != 0:
    s += i
print(s)
Problem p02773 (python)

Fixed submission:
import collections
n = int(input())
s=[input() for i in range(n)]
ans = list()

c = collections.Counter(s)

m = max(c.values())
for k,v in c.items():
    if v ==m:
        ans.append(k)
ans.sort()
print(*ans,sep="\n")

Buggy submission (verdict: Runtime Error):
import collections
n = int(input())
s=[input() for i in range(n)]
ans = list()


c = collections.Counter(s)
k = c.most_common()


if n == 1:
    print(s[0])
elif n >= 2 and len(c.keys()) == 1:
    print(c.most_common()[0][0])
for i in range(k):
    if k[0][0] == k[i][1]:
        ans.append(k[i][0])
    else:
        break
        
ans = sorted(ans)
[print(i) for i in ans]

Buggy submission (verdict: Runtime Error):
import collections
n = int(input())
s=[input() for i in range(n)]

c = collections.Counter(s)

ans = list()
ans.append(c.most_common()[0][0])

for i in range(1,n):
    if c.most_common()[0][1] == c.most_common()[i][1]:
        ans.append(c.most_common()[i][0])
    else:
        break

ans = sorted(ans)
[print(i) for i in ans]
Problem p03041 (python)

Fixed submission:
n,k = map(int,input().split())
s = input()
print(s[:k-1]+s[k-1].lower()+s[k:])

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
s = input()
print(s[:k-1]+s[k-1].lower+s[k:])

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
s = input()
print(s[:k-1]+s[k-1].lower+s[k:])
Problem p02688 (python)

Fixed submission:
n, k = map(int, input().split())
A_list  =[]
import numpy as np
nuske = np.zeros(n)

for _ in range(k): 
    d = input()
    a = list(map(int, input().split()))
    for i in a:
        nuske[ i-1] +=1

p =0

for i in range(len(nuske)):
    if nuske[i] ==0:
        p+=1

print(p)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
A_list  =[]
nuske = np.zeros(n)
import numpy as np
for _ in range(k): 
    d = input()
    a = list(map(int, input().split()))
    for i in a:
        nuske[ i-1] +=1

p =0

for i in range(len(nuske)):
    if nuske[i] ==0:
        p+=1

print(p)

Buggy submission (verdict: Runtime Error):
n, k = map(int, input().split())
d_list = []
A_list  =[]
nuske = np.zeros(n)
print(nuske)
import numpy as np
for _ in range(k): 
    d = input()
    a = list(map(int, input().split()))
    for i in a:
        nuske[i-1] +=1

p =0

for i in range(len(nuske)):
    if nuske[i] ==0:
        p+=1

print(p)
Problem p02676 (python)

Fixed submission:
k = int(input())

s = input()


if k < len(s):  ##以上の時
    print(s[:k] + "...")
else:
    print(s)

Buggy submission (verdict: Runtime Error):

 k = int(input())

 s = input()


if k < len(s):  ##以上の時
    print(s[:k] + "...")
else:
    print(s)