Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#D
#入力
n,a,b=map(int,input().split())

#処理
import math

from operator import mul
from functools import reduce

def combinations_count(n, r):
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom

print((2**n-combinations_count(n, a)-combinations_count(n, b)-1)%(10**9+7))

Fixed submission:
# D
#入力
n,a,b=map(int,input().split())

#諸関数
def pront(X):
    #デバッグ用プリント
    #環境変数としてdebugを確保して、それが1なら内容を出力
    if debug==0:
        print(X)

#デバッグ用
debug=1#0:本番,1:デバッグ中

#処理
#定数
base=(10**9)+7

#関数
    #10*9+7で割ったあまりを返し続ける
def add(a,b):#a+b
    return(((a%base)+(b%base))%base)
def sub(a,b):#a-b
    return (((a%base)-(b%base))%base)
def multi(a,b):#a*b
    return(((a%base)*(b%base))%base)
def exp(a,b):#a**b
    x=1
    c=a
    d=b
    while d!=0:
        if d%2==1:
            x=multi(x,c)
        c=(c**2)%base
        d=d//2
    return x

#割り算はフェルマーの小定理に基づいて考える
def div(a,b):#a/b
    return(multi(a,exp(b,base-2)))

    #その他演算
def fact(m,n):#m~nの積(m<n)
    x=1
    for i in range(m,n+1):
        x=multi(x,i)
    return x
def comb(n,r):
    return div(fact(n-r+1,n),fact(1,r))
#処理
Z=sub(sub(sub(exp(2,n),comb(n,a)),comb(n,b)),1)
print(Z)

Buggy python submission (verdict: Time Limit Exceeded):
#D
#入力
n,a,b=map(int,input().split())

#処理
import math
Z=[[-1 for i in range(b+1)] for j in range(n+1)]

def comb(n,r):
    if r==0 or r==n:
        Z[n][r]=1
        return 1
    elif Z[n][r]>0:
        return Z[n][r]
    else:
        Z[n][r]=comb(n-1,r-1)+comb(n-1,r)
        return Z[n][r]
        

print((2**n-comb(n,a)-comb(n,b)-1)%(10**9+7))

Fixed submission:
# D
#入力
n,a,b=map(int,input().split())

#諸関数
def pront(X):
    #デバッグ用プリント
    #環境変数としてdebugを確保して、それが1なら内容を出力
    if debug==0:
        print(X)

#デバッグ用
debug=1#0:本番,1:デバッグ中

#処理
#定数
base=(10**9)+7

#関数
    #10*9+7で割ったあまりを返し続ける
def add(a,b):#a+b
    return(((a%base)+(b%base))%base)
def sub(a,b):#a-b
    return (((a%base)-(b%base))%base)
def multi(a,b):#a*b
    return(((a%base)*(b%base))%base)
def exp(a,b):#a**b
    x=1
    c=a
    d=b
    while d!=0:
        if d%2==1:
            x=multi(x,c)
        c=(c**2)%base
        d=d//2
    return x

#割り算はフェルマーの小定理に基づいて考える
def div(a,b):#a/b
    return(multi(a,exp(b,base-2)))

    #その他演算
def fact(m,n):#m~nの積(m<n)
    x=1
    for i in range(m,n+1):
        x=multi(x,i)
    return x
def comb(n,r):
    return div(fact(n-r+1,n),fact(1,r))
#処理
Z=sub(sub(sub(exp(2,n),comb(n,a)),comb(n,b)),1)
print(Z)
Buggy python submission (verdict: Runtime Error):
#C
#入力
N=int(input())
S=[input() for i in range(N)]

#処理
result={}
for i in S:
    if i in result:
        result[i]+=1
    else:
        result[i]=1

x=max(result.values())
x.sort

for i in result.items():
    if i[1]==x:
        print(i[0])

Fixed submission:
#C
#入力
N=int(input())
S=[input() for i in range(N)]

#処理
result={}
for i in S:
    if i in result:
        result[i]+=1
    else:
        result[i]=1

x=max(result.values())

Z=[]
for i in result.items():
    if i[1]==x:
        Z.append(i[0])
Z.sort()
for i in Z:
    print(i)

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

d={}

for i in s:
  if i in d:
    d[i]+=1
  else:
    d[i]=1
d=sorted(d.items(),reverse=True)



for i in d.key():
  print(i)


Fixed submission:
#C
#入力
N=int(input())
S=[input() for i in range(N)]

#処理
result={}
for i in S:
    if i in result:
        result[i]+=1
    else:
        result[i]=1

x=max(result.values())

Z=[]
for i in result.items():
    if i[1]==x:
        Z.append(i[0])
Z.sort()
for i in Z:
    print(i)

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

d={}

for i in s:
  if i in d:
    d[i]+=1
  else:
    d[i]=1
d=sorted(d.items,reverse=True)



for i in d.key:
  print(i)


Fixed submission:
#C
#入力
N=int(input())
S=[input() for i in range(N)]

#処理
result={}
for i in S:
    if i in result:
        result[i]+=1
    else:
        result[i]=1

x=max(result.values())

Z=[]
for i in result.items():
    if i[1]==x:
        Z.append(i[0])
Z.sort()
for i in Z:
    print(i)

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

d={}

for i in s:
  if i in d:
    d[i]+=1
  else:
    d[i]=0
d=sorted(d.items,reverse=True)



for i in d.key:
  print(i)

Fixed submission:
#C
#入力
N=int(input())
S=[input() for i in range(N)]

#処理
result={}
for i in S:
    if i in result:
        result[i]+=1
    else:
        result[i]=1

x=max(result.values())

Z=[]
for i in result.items():
    if i[1]==x:
        Z.append(i[0])
Z.sort()
for i in Z:
    print(i)
Buggy python submission (verdict: Runtime Error):
#A
#入力
S,T=input().split()
A,B=input().split()
U=input()

#処理
if S==U:
    A-=1
elif T==U:
    B-=1
    
print(str(A)+" "+str(B))

Fixed submission:
#A
#入力
S,T=input().split()
A,B=map(int,input().split())
U=input()

#処理
if S==U:
    A-=1
elif T==U:
    B-=1
    
print(str(A)+" "+str(B))
Buggy python submission (verdict: Time Limit Exceeded):
#C
#入力
N=int(input())
A=list(map(int,input().split()))

#処理
t=0
for i in range(len(A)):
    if A[i] in A[:i]+A[i+1:]:
        print("NO")
        t=1
        break
if t==0:
    print("YES")

Fixed submission:
#C
#入力
N=int(input())
A=list(map(int,input().split()))

#処理

A.sort()
t=0
for i in range(N-1):
    if A[i]==A[i+1]:
        print("NO")
        t=1
        break
if t==0:
    print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
#C
#入力
N=int(input())
A=list(map(int,input().split()))

#処理
t=0
for i in range(len(A)):
    if A[i] in A[:i]+A[i+1:]:
        print("NO")
        t=1
        break
if t==0:
    print("YES")

Fixed submission:
#C
#入力
N=int(input())
A=list(map(int,input().split()))

#処理

A.sort()
t=0
for i in range(N-1):
    if A[i]==A[i+1]:
        print("NO")
        t=1
        break
if t==0:
    print("YES")

Buggy python submission (verdict: Time Limit Exceeded):
#C
#入力
N=int(input())
A=list(map(int,input().split()))

#処理
t=0
while len(A)!=0:
    x=A[0]
    A=A[1:]
    for i in A:
        if x==i:
            print("NO")
            t=1
            break
if t==0:
    print("YES")

Fixed submission:
#C
#入力
N=int(input())
A=list(map(int,input().split()))

#処理

A.sort()
t=0
for i in range(N-1):
    if A[i]==A[i+1]:
        print("NO")
        t=1
        break
if t==0:
    print("YES")
Buggy python submission (verdict: Runtime Error):
#D
#　モジュール
import numpy as np
#入力
N,K=map(int,input().split())
P=list(map(int,input().split()))

#処理
#内部関数
def d_1(x):
    t=0
    for i in range(1,x+1):
        t+=i/x
        
    return t

P=np.array([ d_1(i) for i in P])#出る目を期待値に変換
S=np.zeros(K)
for i in range(K):
    S=S+P[i:i+K]
print(np.max(S))
        

Fixed submission:
#D
#モジュール
import numpy as np

#入力
N,K=map(int,input().split())
P=np.array(list(map(int,input().split())))

#諸関数
def pront(X):
    #デバッグ用プリント
    #環境変数としてdebugを確保して、それが1なら内容を出力
    if debug==0:
        print(X)

#デバッグ用
debug=1#0:本番,1:デバッグ中



#処理
pront(P)
#関数
def d_1(p):
    #1~pまででるサイコロの期待値を返す
    return((p+1)/2)
#ここまで

P=list(d_1(P))

pront(P)

X=[0]
for i in range(N):
    if i==0:
        X.append(P[i])
    else:
        X.append(P[i]+X[-1])
result=-1
pront(X)
for i in range(N-K+1):
    cal=X[i+K]-X[i]
    if result<cal:
        result=cal
print(result)

Buggy python submission (verdict: Time Limit Exceeded):
#D
#入力
N,K=map(int,input().split())
P=list(map(int,input().split()))

#処理
#内部関数
def d_1(x):
    t=0
    for i in range(1,x+1):
        t+=i/x
        
    return t

P=[ d_1(i) for i in P]#出る目を期待値に変換

x=sum(P[:K])

for i in range(N-K+1):
    t=sum(P[i:i+K])
    if t>x:
        x=t
        
print(x)
        

Fixed submission:
#D
#モジュール
import numpy as np

#入力
N,K=map(int,input().split())
P=np.array(list(map(int,input().split())))

#諸関数
def pront(X):
    #デバッグ用プリント
    #環境変数としてdebugを確保して、それが1なら内容を出力
    if debug==0:
        print(X)

#デバッグ用
debug=1#0:本番,1:デバッグ中



#処理
pront(P)
#関数
def d_1(p):
    #1~pまででるサイコロの期待値を返す
    return((p+1)/2)
#ここまで

P=list(d_1(P))

pront(P)

X=[0]
for i in range(N):
    if i==0:
        X.append(P[i])
    else:
        X.append(P[i]+X[-1])
result=-1
pront(X)
for i in range(N-K+1):
    cal=X[i+K]-X[i]
    if result<cal:
        result=cal
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
#C
#入力
N=int(input())
A=list(map(int,input().split()))
#処理
for i in range(N):
    print(A.index(i+1)+1, end=" ")

Fixed submission:
#C
#入力
N=int(input())
A=list(map(int,input().split()))

#処理
B=[0 for i in range(N)]

for i in range(N):
    B[A[i]-1]=i+1
    

for i in B:
    print(i,end=" ")
Buggy python submission (verdict: Time Limit Exceeded):
#C
#モジュール
import numpy as np
#入力
N,K,Q=map(int,input().split())
A=[int(input()) for i in range(Q)]
pt=np.array([K for i in range(N)])

#処理
#点数の算出
for i in A:
    pt[:i-1]=pt[:i-1]-1
    pt[i:]=pt[i:]-1
#敗退か否かの出力
for i in pt:
    if i>0:
        print("Yes")
    else:
        print("No")

Fixed submission:
#C
#入力
N,K,Q=map(int,input().split())
A=[int(input())-1 for i in range(Q)]

#処理
B=[0 for i in range(N)]

for i in A:
    B[i]+=1

for i in B:
    if Q-i<K:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Time Limit Exceeded):
#4
#入力
N=int(input())
A=list(map(int,input().split()))

#デバッグ関連
debug=1#0:本番,1:デバッグ

def pront(*n):
    if debug==1:
        print(n)

#処理
A.sort()

x=0
while len(A)!=0:
    y=A.count(A[0])
    if y<A[0]:
        x+=y
    else:
        x+=y-A[0]
    A=A[y:]
print(x)

Fixed submission:
#4
#入力
N=int(input())
A=list(map(int,input().split()))

#デバッグ関連
debug=0#0:本番,1:デバッグ

def pront(*n):
    if debug==1:
        print(n)

#処理
X={}
for i in A:
    if i in X:
        X[i]+=1
    else:
        X[i]=1

        x=0
for i in X.items():
    pront(i)
    if i[0]>i[1]:
        x+=i[1]
    else:
        x+=i[1]-i[0]
        
print(x)
Buggy python submission (verdict: Runtime Error):
#入力
S=input()

#処理
l=len(S)
if l==0:
  t=1
else:
  t=0

X="AKIHABAR"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==1:
  print("NO")
elif len(X)!=0:
  print("NO")
else:
  print("YES")
        


Fixed submission:
#1
#入力
S=input()


#処理
import re
m=re.fullmatch(r'A?KIHA?BA?RA?',S)

if m==None:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Runtime Error):
#入力
S=input()

#処理
l=len(S)
if l==0:
  t=1
else:
  t=0

X="AKIHABARA"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==1:
  print("NO")
elif len(X)!=0:
  print("NO")
else:
  print("YES")
        

Fixed submission:
#1
#入力
S=input()


#処理
import re
m=re.fullmatch(r'A?KIHA?BA?RA?',S)

if m==None:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Runtime Error):
#入力
S=input()

#処理
l=len(S)
if l==0:
  t=1
else:
  t=0

X="AKIHABARA"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==0:
  print("YES")
else:
  print("NO")
        
      


Fixed submission:
#1
#入力
S=input()


#処理
import re
m=re.fullmatch(r'A?KIHA?BA?RA?',S)

if m==None:
    print("NO")
else:
    print("YES")

Buggy python submission (verdict: Runtime Error):
#入力
S=input()

#処理
l=len(S)
t=0
X="AKIHABARA"
while len(S)!=0:
  if S[0]=="A":
    if S[0]==X[0]:
      S=S[1:]
      X=X[1:]
    else:
      t=1
      break
  else:
    if X[0]=="A":
      X=X[1:]
    else:
      if S[0]==X[0]:
      	S=S[1:]
      	X=X[1:]
      else:
        t=1
        break
        
if t==0:
  print("YES")
else:
  print("NO")
        
      

Fixed submission:
#1
#入力
S=input()


#処理
import re
m=re.fullmatch(r'A?KIHA?BA?RA?',S)

if m==None:
    print("NO")
else:
    print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[int(i) for i in input().split()]
b=1

for i in a:
    b=b*i

if b>10**18:
    print(-1)
else:
    print(b)


Fixed submission:
n=int(input())
a=[int(i) for i in input().split()]
b=1
a.sort()
for i in a:
    b=b*i
    
    if b>10**18:
        b=-1
        break
    
print(b)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=list(input())
c=0
for i in range(len(s)):
    if s[i] == "A":
        if s[i+1]=="B":
                try:
                    if s[i+2]=="C":
                        c+=1
                except:
                    pass
            
print(c)

Fixed submission:
n=int(input())
s=list(input())
c=0
for i in range(len(s)):
    if s[i] == "A":
        try:
            if s[i+1]=="B":    
                if s[i+2]=="C":
                    c+=1
        except:
            pass
            
print(c)

Buggy python submission (verdict: Runtime Error):
n=int(input())
s = list(input())
c=0
for i in range(len(s)):
    if s[i] == "A":
        if s[i+1]=="B":
               if s[i+2]=="C":
                    c+=1
               
            
print(c)
        

Fixed submission:
n=int(input())
s=list(input())
c=0
for i in range(len(s)):
    if s[i] == "A":
        try:
            if s[i+1]=="B":    
                if s[i+2]=="C":
                    c+=1
        except:
            pass
            
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[]
c=[]
for _ in range(n):
    a.append(int(input()))
for i in range(n):
    c=a[i]
    del a[i]
    print(max(a))
    a.insert(i,c)
    

Fixed submission:
n=int(input())
a=[]
c=[]
for _ in range(n):
    a.append(int(input()))
for i in a:
    c.append(i)

a.sort(reverse=True)

m_1=a[0]
m_2=a[1]
for i in range(n):
    if c[i]==m_1:
        print(m_2)
    else:
        print(m_1)
Buggy python submission (verdict: Runtime Error):
x,a=map(int,input().split())
b=0
c=0
A=list(map(int,input().split()))
while b<=a:
    b=b+A[c]
    c+=1
print(c)

Fixed submission:
a,b=map(int,input().split())
l=list(map(int,input().split()))
c=1
d=0
r=len(l)
for i in range(r):
    d=d+l[i]
    if d<=b:
        c=c+1
 
        
print(c)

Buggy python submission (verdict: Runtime Error):
x,a=map(int,input().split())
b=0
c=0
A=[int(input()) for _ in range(x)]
while b<=a:
    b=b+A[c]
    c+=1
print(c)

Fixed submission:
a,b=map(int,input().split())
l=list(map(int,input().split()))
c=1
d=0
r=len(l)
for i in range(r):
    d=d+l[i]
    if d<=b:
        c=c+1
 
        
print(c)

Buggy python submission (verdict: Runtime Error):
x,a=map(int,input().split())
b=0
c=0
A = [int(input()) for _ in range(x)]
while b<=a:
    b=b+A[c]
    c+=1
print(c)

Fixed submission:
a,b=map(int,input().split())
l=list(map(int,input().split()))
c=1
d=0
r=len(l)
for i in range(r):
    d=d+l[i]
    if d<=b:
        c=c+1
 
        
print(c)
Buggy python submission (verdict: Runtime Error):
a,p=int(input().split())
c=a*3
b=(c+p)//2
print(b)


Fixed submission:
a,p=map(int,input().split())
c=a*3
b=(c+p)//2
print(b)

Buggy python submission (verdict: Runtime Error):
a=int(input())
p=int(input())
c=a*3
b=(c+p)/2
print(b)

Fixed submission:
a,p=map(int,input().split())
c=a*3
b=(c+p)//2
print(b)

Buggy python submission (verdict: Runtime Error):
a=int(input())#りんご
p=int(input())#りんご欠片
c=a*3
b=(c+p)//2
print(b)


Fixed submission:
a,p=map(int,input().split())
c=a*3
b=(c+p)//2
print(b)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=max(a,b)
d=min(a,b)
e=max(c-1,d)
print(c+e)

Fixed submission:
a,b=map(int,input().split())
c=max(a,b)
d=min(a,b)
e=max(c-1,d)
print(c+e)

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=max(a,b)
d=min(a,b)
e=max(c-1,d)
print(c+e)

Fixed submission:
a,b=map(int,input().split())
c=max(a,b)
d=min(a,b)
e=max(c-1,d)
print(c+e)
Buggy python submission (verdict: Runtime Error):
N=int(input())
s=input().split()
y=0
v=0
for i in s:
    if i=='R':
        y+=1
    elif i=='B':
        v+=1
if y>v:
    print('Yes')
elif v>=y:
    print('No')

Fixed submission:
A,B,C=map(int,input().split())
if A==B==C:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
A=int(input())
B=int(input())
C=int(input())
if A==B==C:
    print('Yes')
else:
    print('No')

Fixed submission:
A,B,C=map(int,input().split())
if A==B==C:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import sys

def solve (a,b):
    c=int(b)//2
    D=int(a)+int(c)
    print(D)
    
def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
 main()


Fixed submission:
import sys

def solve(a, b):
    return(int(a)+int(b)//2)


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
main()

Buggy python submission (verdict: Runtime Error):
improt sys

def solve (a,b):
    c=int(b)//2
    D=int(a)+int(c)
    print(D)

def readQuestion（）：
    ws = sys.stdin.readline（）。strip（）。split（）
    a = int（ws [0]）
    b = int（ws [1]）
    return（a、b）

def main（）：
    print（solve（* readQuestion（）））

＃提出前にコメントを外す
main（）

Fixed submission:
import sys

def solve(a, b):
    return(int(a)+int(b)//2)


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
main()

Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
c=int(b)//2
D=int(a)+int(c)
print(D)

Fixed submission:
import sys

def solve(a, b):
    return(int(a)+int(b)//2)


def readQuestion():
    ws = sys.stdin.readline().strip().split()
    a = int(ws[0])
    b = int(ws[1])
    return (a, b)

def main():
    print(solve(*readQuestion()))

# Uncomment before submission
main()
Buggy python submission (verdict: Runtime Error):
a,b=input(),input()
c=int(a)-int(b)+1
print(c)

Fixed submission:
a,b=map(int,input().split())
t=a-b+1
print(t)

Buggy python submission (verdict: Runtime Error):
(a,b)=input(),input()
c=int(a)-int(b)+1
print(c)

Fixed submission:
a,b=map(int,input().split())
t=a-b+1
print(t)

Buggy python submission (verdict: Runtime Error):
(a,b)=input(),input()
c=int(a)-int(b)+1
print(c)

Fixed submission:
a,b=map(int,input().split())
t=a-b+1
print(t)

Buggy python submission (verdict: Runtime Error):
(a,b)=input(),input()
c=int(a)-int(b)+1
print(c)

Fixed submission:
a,b=map(int,input().split())
t=a-b+1
print(t)

Buggy python submission (verdict: Runtime Error):
(a,b)=input(),input()
c=int(a)-int(b)+1
print(c)

Fixed submission:
a,b=map(int,input().split())
t=a-b+1
print(t)

Buggy python submission (verdict: Runtime Error):
(a,b)=input(),input()
c=a-b+1
print(c)


Fixed submission:
a,b=map(int,input().split())
t=a-b+1
print(t)

Buggy python submission (verdict: Runtime Error):
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(a, b):
      c=a-b+1
    return(c)
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Fixed submission:
a,b=map(int,input().split())
t=a-b+1
print(t)
Buggy python submission (verdict: Runtime Error):
import sys

def solve (N):
    s=0
    for b in str(N):
        s = s + int(b)
    if N % s ==0:
        return 'Yes'
    else:
        return 'No'

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):
   
# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Fixed submission:
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve (N):
    s=0
    for b in str(N):

        s = s + int(b)
    if N % s ==0:
        return 'Yes'
    else:
        return 'No'
   

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import sys

def solve(a,b):
    if  a <= 8 and b <= 8 :
        return 'yay'
    else:
        return ':('
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Fixed submission:
import sys

def solve(a, b):
    if  a <= 8 and b <= 8 :
        return 'Yay!'
    else:
        return ':('
    
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys

def solve(n):
    if  a <= 8 and b <= 8 :
        return 'yay'
    else:
        return ':('
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Fixed submission:
import sys

def solve(a, b):
    if  a <= 8 and b <= 8 :
        return 'Yay!'
    else:
        return ':('
    
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):
    if  a <= 8 and b <= 8 :
        return 'yay'
    else:
        return ':('

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

Fixed submission:
import sys

def solve(a, b):
    if  a <= 8 and b <= 8 :
        return 'Yay!'
    else:
        return ':('
    
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()