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

Fixed submission:
def qqq(n):

    a = int(n/100)
    if a == 7: 
        return "Yes" 
    
    n %= 100
    b = int(n/10)
    if b == 7:
        return "Yes"
    
    n %= 10
    if n == 7:
        return "Yes"

    return "No"

if __name__ == '__main__':
    N = int(raw_input())
    print qqq(N)

Buggy submission (verdict: Runtime Error):

def main():
    n = int(input())
    
    if n//100 == 7:
        return "Yes"
    
    n %= 100
    if n // 10 == 7:
        return "Yes"
    
    n %= 10
    if n == 7:
        return "Yes"
    
    return "No"


if __name__ == '__main__':
    print main()

Buggy submission (verdict: Runtime Error):
    def qqq(n):
     
        a = int(n/100)
        if a == 7: 
            return "Yes" 
        
        n %= 100
        b = int(n/10)
        if b == 7:
            return "Yes"
        
        n %= 10
        if n == 7:
            return "Yes"
     
        return "No"
     
    if __name__ == '__main__':
        N = int(input())
        print (qqq(N))

Buggy submission (verdict: Runtime Error):
def qqq(n):

    a = int(n/100)
    if a == 7: 
        return "Yes" 
    
    n %= 100
    b = int(n/10)
    if b == 7:
        return "Yes"
    
    n %= 10
    if n == 7:
        return "Yes"

    return "No"

if __name__ == '__main__':
    N = int(input())
    print qqq(N)
Problem p02676 (python)

Fixed submission:
S=int(input())
K=input()
k=len(K)

if k>S:
    print(K[:S]+'...')
else:
    print(K)

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

Fixed submission:
n=int(input())
chara=input()
nc=len(chara)

if n>=nc:
  print(chara)
else:	
  print(chara[0:n]+"...")

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

if n=>nc:
  print(chara)
else:	
  print(chara[1:n])
Problem p02990 (python)

Fixed submission:
import math
n, k = map(int, input().split())
"""
def cmb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

mod = 10**9+7
"""
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 2000
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

for i in range(1, k + 1):
    print((cmb(n - k + 1, i, mod) * cmb(k - 1, i - 1, mod)) % mod)
    #print(cmb(n - k + 1, i))
    #print(cmb(k - 1, i - 1))

Buggy submission (verdict: Runtime Error):
import math
n, k = map(int, input().split())

def cmb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

mod = 10**9+7

for i in range(1, k + 1):
    print(cmb(n - k + 1, i) * cmb(k - 1, i - 1) % mod)
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[3]==s[4] and s[5]==s[6]:
    print("Yes")
else:
    print("No")
Problem p02847 (python)

Fixed submission:
s = input()
List = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
#print(List.index(s))
print(7-List.index(s))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
S = len(s)
l = ["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]
m = "ABCDEFGHIJKLMNOQPRSTUVWXYZ"
old_word = 0
new_word = 0
ans = []
#print(S)
#print(l[n])
#print(m[n])

for i in range(S):
    old_word = l.index(s[i])
    #print(old_word)
    new_word = old_word + n
    print(new_word)
    if new_word > 25:
        new_word = new_word - 26
    ans.append(l[new_word])


#print(l.index("B"))
print(ans)
Problem p02881 (python)

Fixed submission:
import math
n = int(input())
m = n**0.5
ans = 1
x = 0 #確認
#print(n)
#print(m)
for i in range(1,math.floor(m)+1):
    x += 1 #確認
    if n%i==0:
        ans = i

print(math.floor(ans+ n/ans -2))

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
m = n**0.5
ans = 0
#print(n)
#print(m)
for i in range(1,math.floor(m+1)):
    if m%i==0:
        ans = i
print(math.floor(ans+ n/ans -2))
Problem p02831 (python)

Fixed submission:
A,B = map(int,input().split())
def gcd(A,B):
    temp = A % B
    while temp != 0:
        A = B
        B = temp
        temp = A%B
    return B
print(int(A*B/gcd(A,B)))

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

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

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

Fixed submission:
n = int(input())
res = []
for i in range(1,10):
    for j in range(1,10):
        res.append(i*j)
res = set(res)
if n in res:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
for i in range(2,n):
    if (n % i) == 0 and i < 10 and n/i <10:
        res = 1
        break
    else:
        res = -1
if res == 1:
    print('Yes')
else:
    print('No')
Problem p02915 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
b = list(map(int,input().split()))
a = [-1]*n
a[0] = b[0]
a[-1:] = b[-1:]
for i in range(n-2):
    a[i+1] = min(b[i],b[i+1])
print(sum(a))
Problem p03208 (python)

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

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

Fixed submission:
n = int(input())
s = str(input())

if len(s) <= n:
    print(s)
else:
    print(s[:n] + "...")

Buggy submission (verdict: Runtime Error):
40
ferelibenterhominesidquodvoluntcredunt
Problem p02682 (python)

Fixed submission:
a,b,c,k=map(int,input().split())
if a<=k<=a+b:
  max_value=a
elif k<a:
	max_value=k
else:
  max_value=a*2-k+b
print(max_value)

Buggy submission (verdict: Runtime Error):
2000000000 0 0 200000000

Buggy submission (verdict: Runtime Error):
list=list(map(int,input().split()))
a=list[0]
b=list[1]
c=list[2]
k=list[3]
if k=<a+b:
  max_value=a
else:
  max_value=a-k+a+b
print(max_value)

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

Buggy submission (verdict: Runtime Error):
a,b,c,k=map(int,input())
if k=<a+b:
  max_value=a
else:
  max_value=a-k+a+b
print(max_value)

Buggy submission (verdict: Runtime Error):
a,b,c,k=map(int,input())
max_value=0
if k=<a+b:
  max_value=a
elif a+b<k=<a+b+c:
  max_value=a-k+a+b
print(max_value)

Buggy submission (verdict: Runtime Error):
a,b,c,k=map(int,input().split())
max_value=0
if k=<a+b:
  max_value=a
elif a+b<k=<a+b+c:
  max_value=a-k+a+b
print(max_value)

Buggy submission (verdict: Runtime Error):
a,b,c,k=map(int,input().split)
max_value=0
if k=<a+b:
  max_value=a
elif a+b<k=<a+b+c:
  max_value=a-k+a+b
print(max_value)
Problem p02693 (python)

Fixed submission:
k=int(input())
p=0
a,b=map(int,input().split())
list=list(range(a,b+1))
for val in list:
  if val%k==0:
    print('OK')
    p+=1
    break
  else:
    continue

if p==0:
  print('NG')

Buggy submission (verdict: Runtime Error):
k=int(input())
a,b=map(int,input.split())
list=range(a,b+1)
for val in list:
  if val%k==0:
    print('OK')
    break
  else:
    print('NG')
    continue
Problem p02831 (python)

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

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

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

Fixed submission:
N, M = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]
BC = [tuple(int(_) for _ in input().split()) for i in range(M)]


A = sorted(A)
BC = sorted(BC, key=lambda x:-x[1])

#print(A, BC)

i = 0
for b, c in BC:
    if i > N:
        break
    for j in range(b):
        if i >= N or A[i] >= c:
            break
        A[i] = c
        i += 1
    
#print(A, BC)

result = sum(A)

print(result)

Buggy submission (verdict: Runtime Error):
N, M = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]
BC = [tuple(int(_) for _ in input().split()) for i in range(M)]


A = sorted(A)
BC = sorted(BC, key=lambda x:-x[1])

#print(A, BC)

i = 0
for b, c in BC:
    if i > N:
        break
    for j in range(b):
        if i > N or A[i] >= c:
            break
        A[i] = c
        i += 1
    
#print(A, BC)

result = sum(A)

print(result)
Problem p03332 (python)

Fixed submission:
N, A, B, K = [int(_) for _ in input().split()]

L = 300000+1
M = 998244353

Fm = {}
inverseFm = {}
x = 1
for i in range(L):
    Fm[i] = x
    x = x * (i + 1) % M

def inverseFm(x, cache={}):
    if x in cache:
        return cache[x]
    result = pow(Fm[x], M - 2, M)
    cache[x] = result
    return result

def C(n, r):
    result = Fm[n] * inverseFm(r) * inverseFm(n - r) % M
    return result

def solve(N, A, B, K):
    result = 0
    for a in range(0, N+1):
        b, m = divmod(K - A * a, B)
        if m == 0 and 0 <= b <= N:
            result += C(N, a) * C(N, b) % M
    return result % M

print(solve(N, A, B, K))

Buggy submission (verdict: Runtime Error):

N, A, B, K = [int(_) for _ in input().split()]


def solve0(N, A, B, K):
    result = 0
    for r in range(0, N + 1):
        for g in range(0, N + 1 - r):
            for b in range(0, N + 1 - r - g):
                if A * r + (A + B) * g + B * b == K:
                    result += 0
    return result

def gcd(a, b):
    if a < b:
        a, b = b, a
    while b:
        a, b = b, a % b
    return a

#from collections import defaultdict
#xs = defaultdict(int)

L = 300000

M = 998244353

Fm = {}
inverseFm = {}
x = 1
for i in range(L):
    Fm[i] = x
    x = x * (i + 1) % M

def inverseFm(x, cache={}):
    if x in cache:
        return cache[x]
    result = pow(Fm[x], M - 2, M)
    cache[x] = result
    return result

def C(n, r):
    result = Fm[n] * inverseFm(r) * inverseFm(n - r) % M
    return result

def solve(N, A, B, K):
    for i in range(N + 1):
        x = K - A * i
        if x % B == 0:
            break
    else:
        return 0
    l = A * B // gcd(A, B)
    result = 0
    for a in range(i, N + 1, l):
        b = (K - A * a) // B
        for x in range(0, a + 1):
            y = a - x
            z = b - y
            if z >= 0 and x + y + z <= N:
                result = (result + (C(N, x) * C(N - x, y) * C(N - x - y, z)) % M) % M
    return result 

print(solve(N, A, B, K))
Problem p02831 (python)

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

n = max(a,b)
m = min(a,b)

def gcd(n,m):
    l = n % m
    if l == 0:
        return m
    return gcd(m,l)

def lcm(n,m):
    return (n*m) // gcd(n,m)
    
print(lcm(n,m))

Buggy submission (verdict: Runtime Error):
import math

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

def lcm(a,b):
    return (a*b) // math.gcd(a,b)

print(lcm(a,b))

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

def lcm(a,b):
    return (a*b) // math.gcd(a,b)
  
print(lcm(a,b))
Problem p02836 (python)

Fixed submission:
s = input()

a = len(s) // 2
count = 0

for i in range(a):
    if s[i] != s[-(i+1)]:
        count += 1
            
print(count)

Buggy submission (verdict: Runtime Error):
s = input()
rs = reversed(s)
count = 0

for i in range((len(s) // 2):
    if s[i] != rs[i]:
        count += 1
print(count)
Problem p02880 (python)

Fixed submission:
n = int(input())
ans = 'No'

for i in range(1,10):
    for j in range(1,10):
        if n == i*j:
            ans = 'Yes'
            break
    
print(ans)

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

for i in range(1,10):
    for j in range(1,10):
        
if n == i*j:
    ans = 'Yes'
    break
    
print(ans)
Problem p03315 (python)

Fixed submission:
s = list(input())
ans = 0
for i in s:
    if i == '+':
        ans += 1
    else:
        ans -= 1
print(ans)

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

print(-(-(n-1) // (k-1)))
Problem p02676 (python)

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

Buggy submission (verdict: Runtime Error):
[K,S] = input()

if len(S)>K:
     print(S[:K]+"...")
else:
    print(S)
Problem p02676 (python)

Fixed submission:
i = int(input())
s= input()
if len(s) > i:
	s=s[:i] + "..."
print(s)

Buggy submission (verdict: Runtime Error):
i = int(input())
s= input()
if len(s) > k:
  s=s[:k] + "..."
print(s)
Problem p02693 (python)

Fixed submission:
import math
import sys

K = int(input())
distance = list(map(int,input().split()))


for i in range(distance[1]-distance[0]+1):
    if (distance[0]+i) % K == 0:
        print("OK")
        sys.exit()

print("NG")

Buggy submission (verdict: Runtime Error):
import math

K = input()
distance = list(map(int,input().split()))

for i in range(distance[1]-distance[0]+1):
    if (distance[0]+i) % K == 0:
        print("OK")

print("NG")

Buggy submission (verdict: Runtime Error):
import math

K = input()
distance = list(map(int,input().split()))

for i in range(len(distance)):
    if distance[i] % K == 0:
        print("OK")

print("NG")
Problem p02701 (python)

Fixed submission:
N = int(input())
S = []
for i in range(N):
    S.append(input())

S.sort()

dup = 0;
for i in range(N):
    if i!=0:
        if S[i] == S[i-1]:
            dup += 1

print(N-dup)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = [0]*N
for i in range(N):
    S[i] = input()

prize = [S[1]]
flag = 0
for i in range(N):
    for j in range(len(prize)):
        if(S[i] == prize[j]):
            flag = 1
    if(flag==0):
        prize = prize + [S[i]]
    flag = 0


print(len(prize))
Problem p02711 (python)

Fixed submission:
import sys

n = input()
for i in range(3):
    if(n[i] == "7"):
        print("Yes")
        sys.exit()

print("No")

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

n_1 = (n-(n//10)*10)
n_10 = (n-(n//100)*100 - n_1)//10
n_100 = (n - n_1 - n_10*10)//100

if(n_1!=7 && n_10!=7 && n_100!=7):
  flag = 0

if flag == 0 :
  print("NO")
else:
  print("YES")

Buggy submission (verdict: Runtime Error):
import sys

n = input()
for i in range(3):
  if(n[i] == "7"):
    printf("YES")
    sys.exit()

printf("NO")
Problem p02676 (python)

Fixed submission:

k= int(input())
s= input()

a=len(s)

if k >= a:
  print(s)

else :
  print(s[:k]+"...")

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


a=len(s)

if k >= a:
  print(s)

else :
  print(s[:k]+"...")

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

a=len(s)

if k>=a:
print(s)

else :
print(s[:k]+"...")

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

a=len(s)

if k>=a:
print(s)

else :
print(s[:k]+"...")

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

a=len(s)

if k>=a:
print(s)

else k<a:
print(s[k]+"...")

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

if k<a
print(s)

elif k>a
print(k+"...")

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

if s<a
print(s)

elif s>a
print(k+"...")
Problem p03345 (python)

Fixed submission:
import numpy as np
# -*- coding: utf-8 -*-
A, B, C, K = map(int, input().split())
W = np.array([[0,1,1], [1,0,1], [1,1,0]])
bef_X = np.array([A, B, C])
aft_X = np.dot(np.linalg.matrix_power(W, K),  bef_X)

ans = aft_X[0] - aft_X[1]

print("{0}".format(ans if ans <= 10**18 else 'unfair'))

Buggy submission (verdict: Runtime Error):
import numpy as np
# -*- coding: utf-8 -*-
A, B, C, K = map(int, input().split())
W = np.array([[0,1,1], [1,0,1], [1,1,0]])
bef_X = np.array([A, B, C])
aft_X = np.linalg.matrix_power(W, K) @ bef_X

ans = aft_X[0] - aft_X[1]

print("{0}".format(ans if ans <= 10**18 else 'unfair'))

Buggy submission (verdict: Runtime Error):
import numpy as np
# -*- coding: utf-8 -*-
A, B, C, K = map(int, input().split())
bef_X = np.array([A, B, C])
aft_X = np.linalg.matrix_power(W, K) @ bef_X

ans = aft_X[0] - aft_X[1]

print("{0}".format(ans if ans <= 10**18 else 'unfair'))
Problem p02676 (python)

Fixed submission:
K = input()
S = str(input())
if len(S)<=int(K):
    print(S)
if len(S)>int(K):
    K = int(K)
    S = str(S[0:K])+ "..."
    print(S)

Buggy submission (verdict: Runtime Error):
K = input()
S = str(input())
if len(S)<=K:
    print(S)
if len(S)>K:
    K = int(K)
    S = str(S[0:K])+ "..."
    print(S)
Problem p02759 (python)

Fixed submission:
N = int(input())
if N%2 ==0:
 print(N//2)
if N%2 ==1:
 N = N//2+1
 print(N)

Buggy submission (verdict: Runtime Error):
N = input()
N = N//2
print(N)
Problem p02759 (python)

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

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

Fixed submission:
n = input()
count = 0
first, second = n[:len(n)//2], n[(len(n)+1)//2:]
if first == reversed(second):
    print(count)
else:
    for x in range(len(first)):
        if first[x] != second[len(second)-x-1]:
            count += 1
    print(count)

Buggy submission (verdict: Runtime Error):
import java.util.*;
public class Main{
  public static void main(String[] args){
    	Scanner s = new Scanner(System.in);
    	String word = s.nextLine();
    	int leng = word.length();
    	String re = word.reverse();
    	int c = 0;
    	for(i=leng-1; i<=0; i--){
          if(word.charAt(i) == re.charAt(i)){
            	continue;
          }else
            c++;
        }
    System.out.println(c/2);
  }
}
Problem p02682 (python)

Fixed submission:
def resolve():
    import sys

    input = lambda: sys.stdin.readline().rstrip()

    a, b, c, k = map(int,input().split())
    
    if a >= k:
      print(k)
    elif a + b >= k:
      print(a)
    else:
      print(a-(k-(a+b)))
      
resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    import sys

    input = lambda: sys.stdin.readline().rstrip()

    a, b, c, k = map(int,input().split())
    
    if a + b >= k:
      print(k)
      sys.exit()

    arr = [1] * a + [0] * b + [-1] * c

    print(sum(arr[0:k]))

resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    import sys

    input = lambda: sys.stdin.readline().rstrip()

    a, b, c, k = map(int,input().split())
    
    if a <= k:
      print(k)
      sys.exit()

    arr = [1] * a + [0] * b + [-1] * c

    print(sum(arr[0:k]))

resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    import sys

    input = lambda: sys.stdin.readline().rstrip()

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

    arr = [1] * a + [0] * b + [-1] * c

    print(sum(arr[0:k]))

resolve()
Problem p02759 (python)

Fixed submission:
import math

a=int(input())
s=a/2
print(math.ceil(s))

Buggy submission (verdict: Runtime Error):
a=input()
s=a%2
if a==1:
    print(a/2+1)
else:
    print(a/2)
Problem p03017 (python)

Fixed submission:
import re                                                                                                        
import copy                                                                                                      

n,a,b,c,d=map(int,input().split())                                                                               
s=input()                                                                                                        
a-=1                                                                                                             
b-=1                                                                                                             
c-=1                                                                                                             
d-=1                                                                                                             

if "##" in s[a:c+1] or "##" in s[b:d+1]:                                                                                 
    print("No")                                                                                                  
else:                                                                                                            
    if c<d:                                                                                                      
        print("Yes")                                                                                             
    else:                                                                                                        
        if "..." in s[b-1:d+2]:                                                                                  
            print("Yes")                                                                                         
        else:                                                                                                    
            print("No")

Buggy submission (verdict: Runtime Error):
a
Problem p02699 (python)

Fixed submission:
items = list(map(lambda x: int(x), input().split()))
s = items[0]
w = items[1]
print('safe' if s > w else 'unsafe')

Buggy submission (verdict: Runtime Error):
tems = list(map(lambda x: int(x), input().split()))
s = items[0]
w = items[1]
print('safe' if s > w else 'unsafe')
Problem p02682 (python)

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

Buggy submission (verdict: Runtime Error):
A,B,C,K = map(int, input().split())
card_list = [1]*A + [0]*B + [-1]*C
 
print(sum(card_list[0:K]))

Buggy submission (verdict: Runtime Error):
A,B,C,K = map(int, input().split())
card_list = (([1]*A).extend([0]*B)).extend([-1]*C)
 
print(sum(card_list[0:K]))

Buggy submission (verdict: Runtime Error):
A,B,C,K = map(int, input().split())
card_list = (([1]*A).extend([0]*B)).append([-1]*C)

print(sum(card_list[0:K]))
Problem p02688 (python)

Fixed submission:
n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(k):
	i=int(input())
	li=list(map(int,input().split()))
	if i > 0:
		for m in li:
			kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(n-1):
	i=int(input())
	li=list(map(int,input().split()))
	if i > 0:
		for m in li:
			kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(n):
	i=int(input())
	li=list(map(int,input().split()))
	if i > 0:
		for m in li:
			kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
M = 0
for s in range(n):
	i=int(input())
	li=list(map(int,input().split()))
	for m in li:
		kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
kashi = [0] * n
cnt = 0
for s in range(n-1):
	i=int(input())
	li=list(map(int,input().split()))
	for m in li:
		kashi[m-1] +=1

for i in kashi:
	if i == 0:
		cnt += 1

print(cnt)
Problem p02711 (python)

Fixed submission:
n = str(input())
m = "7"
if m in n:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = innput()
 
if "7" in n:
  print("Yes")
else:
  print("No")

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

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