Problem:


Score : 100 points

Problem Statement

Snuke has N integers: 1,2,\ldots,N.
He will choose K of them and give those to Takahashi.

How many ways are there to choose K consecutive integers?

Constraints

All values in input are integers.

1 \leq K \leq N \leq 50

Input

Input is given from Standard Input in the following format:

N K

Output

Print the answer.

Sample Input 1

3 2

Sample Output 1

2

There are two ways to choose two consecutive integers: (1,2) and (2,3).

Sample Input 2

13 3

Sample Output 2

11



Sample input:
3 2


Sample output:
2

Submission status: Wrong Answer

Solution code:
a = int()
b = int()
c = 2*a + 1
print(c-a+b)

Submission status: Wrong Answer

Solution code:
n,k=map(int, input().split())
com=1
for i in range(k):
  com*=n-i
  com=com//(k-i)
print(com)

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())

print((N // K) + (N % K))

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())

print(13 - 3 + 1)

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
print(n-k-1)

Submission status: Wrong Answer

Solution code:
import sys
import math
import bisect

def main():
    n, k = map(int, input().split())
    A = [0] * (k + 1)
    A[0] = 1
    for _ in range(n):
        for i in range(k, -1, -1):
            if i - 1 >= 0:
                A[i] += A[i-1]
    #print('n: %d, k: %d, A: %s' % (n, k, str(A)))
    print(A[k])
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
from itertools import combinations
n, k = map(int, input().split())
print(len(list(combinations(range(n), k))))

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())

print(K-N+1)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

#solve
def solve():
    n, k = LI()
    print(math.factorial(n) // math.factorial(k) // math.factorial(n - k))
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
print(n*(n+1)//2)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print(a + b -1)

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
print(n + k -1)

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
print(int(((n//k)*k)-1))

Submission status: Wrong Answer

Solution code:
n,k = map(int, input().split())
print(n-2)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print(b-a + 1)

Submission status: Wrong Answer

Solution code:
import sys

def main():
    data = input()
    flds = data.split(" ")
    N = int(flds[0])
    K = int(flds[1])

    count = 0
    for i in range(1, N):
        if i + K - 1 <= N:
            count += 1
    print(count)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N,K=map(int, input().split())
print(sum([i for i in range(1,N+1)]))

Submission status: Wrong Answer

Solution code:
import itertools
import array

i = input().split()
i_list = list(range(1,int(i[0])+1))
c_list =array.array('f')
num = int(i[1])
c_list = list(itertools.combinations(i_list, num ))
count =0
#print(c_list)
#print(sum(c_list[0])/len(c_list[0]))
for n in c_list:
   if  (sum(n)/len(n)) == (min(n)+1):
     count +=1
 
print(count)

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
print(int(N/K))

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
n = list(range(1,N))
count=0
for i in n:
  if i + K - 1 <= N:
    count+= 1
print(count)

Submission status: Wrong Answer

Solution code:
import math
N,K = map(int,input().split())
ans = math.factorial(N) / math.factorial(K)
print(ans)

Submission status: Wrong Answer

Solution code:
[a,b]=map(int,input().split())
print(b-a+1)

Submission status: Wrong Answer

Solution code:
inputdata=input().split()
n=int(inputdata[0])
k=int(inputdata[1])
pointer=1
while pointer +k <= n:
  pointer = pointer +1

if n > k:
  print("0")
else:
  print(pointer)

Submission status: Wrong Answer

Solution code:
n,k = map(int, input().split())
ans = 0
num = [i for i in range(1, k+1)]
while num[-1] < k:
    num = [i+1 for i in num]
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n,k = map(int, input().split())
ans = 0
num = [i for i in range(1, k+1)]
while num[-1] <= k:
    num = [i+1 for i in num]
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n,k = map(int, input().split())
print((n-2)*k//k)

Submission status: Wrong Answer

Solution code:
print(4)

Submission status: Wrong Answer

Solution code:
print(2)

Submission status: Wrong Answer

Solution code:
print(1)

Submission status: Wrong Answer

Solution code:
#input
N, K = input().split()

#output
print(int(N) + int(K) - 1)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
print(b-a+1)

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
n1 = 1
while n > 0:
    n1 *= n
    n -= 1
r = n - k
r1 = 1
while r > 0:
    r1 *= r
    r -= 1
k1 = 1
while k > 0:
    k1 *= k
    k -= 1
a = r1 * k1
print(n1//a)

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())

print(N-K)

Submission status: Wrong Answer

Solution code:
import math
N, K = map(int, input().split())

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

print(combinations_count(N, K))

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
ans = K - (N - 1)
print(ans)

Submission status: Wrong Answer

Solution code:
import itertools
i = input().split()
i_list = list(range(1,int(i[0])+1))
num = int(i[1])
c_list = list(itertools.combinations(i_list, num ))
count =0
#print(c_list)
#print(sum(c_list[0])/len(c_list[0]))
for n in c_list:
   if  (sum(n)/len(n)) == (min(n)+1):
     count +=1

print(count)

Submission status: Wrong Answer

Solution code:
n, k = list(int(x) for x in input('n k').split())

ans = 0

for i in range(1, n + 1):
    x = i + (k - 1)
    if x <= n:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N, K = [int(x) for x in input().split(' ')]

output = N - K + 1

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
# 整数の入力
n, k = map(int, input().split())
numlist = np.arange(1,n+1)
j = 0
for i in range(0,n-1):
    a = numlist[i:i+k]
    if a[k-1] == n:
        j += 1
        break
    else:
        j += 1
        pass
print(j)

Submission status: Wrong Answer

Solution code:
N, K = [int(x) for x in input().split(' ')]
n, k = N, K

output = 1
for i in range(K):
  output = output * n / k
  n -= 1
  k -= 1

print(int(output))

Submission status: Wrong Answer

Solution code:
import itertools
import numpy as np
#i = list(map(int,input().split))
i = input().split()
#print(i)
i_list = list(range(1,int(i[0])+1))
#print(i_list)
num = int(i[1])
#print()
c_list = list(itertools.combinations(i_list, num ))

count =0
#print(c_list)
for n in c_list:
   if  np.mean(n) == (min(n)+1):
     count +=1

print(count)

Submission status: Wrong Answer

Solution code:
N, K = [int(x) for x in input().split(' ')]

def factorial(x):
  if x == 0 or x == 1:
    return 1
  else:
    output = 1
    for i in range(x, 0, -1):
      #print(i)
      output *= i
    return output

combination = factorial(N) / factorial(K) / factorial(N-K)
print(int(combination))

Submission status: Wrong Answer

Solution code:
#https://atcoder.jp/contests/diverta2019/tasks/diverta2019_a
# -*- coding: utf-8 -*-

n,k = map(int,input().split())

answer = n-k+1
if n > k :
        answer = 0
print( answer )

Submission status: Wrong Answer

Solution code:
N, K = [int(x) for x in input().split(' ')]

def factorial(x):
  output = 1
  for i in range(x, 0, -1):
    #print(i)
    output *= i
  return output

combination = factorial(N) / factorial(K) / factorial(N-K)
print(int(combination))

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())

def kaizyou(t):
	cnt=1
	for i in range(1,t+1):
		cnt *= i
	return cnt
print(int(kaizyou(N)/(kaizyou(K)*kaizyou(N-K))))

Submission status: Wrong Answer

Solution code:
N, K= map(int, input().split())

print(N+1+K)

Submission status: Wrong Answer

Solution code:
from itertools import combinations

N,K = map(int,input().split())
my_list = range(1,N)
x = combinations(my_list, K)
list_x = list(x)
len_y = len(list_x)
print(len_y)

Submission status: Wrong Answer

Solution code:
import math
def s(N,K):
  a=N-K+1
  return a

Submission status: Wrong Answer

Solution code:
N,K= map(int, input().split())
print(N-K)

Submission status: Wrong Answer

Solution code:
n, k = list(int(x) for x in input('n k').split())
ans = n - (k - 1)
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    n, k = map(int, input().split())

    if n//k >= 2:
        print((n//k)*k-1)
    else:
        print(n//k*k)


if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
def combinations(N, K):
    N = int(N)
    K = int(K)
    if N == K and (N == 1 or K == 1):
        return 0
    elif N == K:
        return 1
    else:
        return N - K + 1
    
N, K = input().split(' ')

print(combinations(N, K))

Submission status: Wrong Answer

Solution code:
n,k =  [int() for i in input().split()]
print(n-k+1)

Submission status: Wrong Answer

Solution code:
import math

n, k = (int(i) for i in input().split()) 
a =  math.factorial(n) / math.factorial(n - k)
	
print( a)

Submission status: Wrong Answer

Solution code:
import math

n, k = (int(i) for i in input().split()) 

	
print(  math.factorial(n) // math.factorial(n - k))

Submission status: Wrong Answer

Solution code:
n, k = [int(i) for i in input().split()]
print(n - k + 2)

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
#print(N%K)
if N%K!=0:
    print(N//K*K-(N%K))
else:
    print(N//K*K)

Submission status: Wrong Answer

Solution code:
import math
def s(N,K):
  a=math.factorial(N)/(math.factorial(K)*math.factorial(N-K))
  return a

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())

def kaizyou(t):
	cnt=1
	for i in range(1,t):
		cnt *= i
	return cnt
print(int(kaizyou(N)/(kaizyou(K)*kaizyou(N-K))))

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
c = (n - k) * k
print(c)

Submission status: Wrong Answer

Solution code:
k,n = map(int, input().split())
print(n-k+1)

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
print(n-k-1)

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
ans = K-N+1
print(ans)

Submission status: Wrong Answer

Solution code:
N, K = input().split(" ")
print(N)

Submission status: Wrong Answer

Solution code:
N,K= map(int,input().split())



print

Submission status: Wrong Answer

Solution code:
h = list(map(int, input().split()))



print(h[0]-h[1])

Submission status: Wrong Answer

Solution code:
n,k=map(int, input().split())
print(n-k)

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
print(K - N + 1)

Submission status: Time Limit Exceeded

Solution code:
n,k = map(int,input().split())
import itertools
cnt = 0
for x in itertools.combinations([x+1 for x in range(n)],k):
    if (x[-1]-x[0]) == k-1:
        cnt+=1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
from itertools import combinations as C
n, k = map(int, input().split())
c = list(C(range(n), k))
ans = 0
for comb in c:
    for i in range(k - 1):
        if comb[i] + 1 == comb[i + 1]:
            continue
        break
    else:
        ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/diverta2019/tasks/diverta2019_a
import itertools

intext = input()
[n, k] = map(int, intext.split())

int_list = [v for v in range(1, n+1)]
nk_combis = itertools.combinations(int_list, k)
ans_nk_combis_cnt = 0

for nk_combi in nk_combis:
    # nk_list = list(nk_combi)

    prev_item = None
    is_renzoku = True

    for nk_item in nk_combi:
        if (prev_item != None) and (prev_item + 1 != nk_item):
            is_renzoku = False
            break
        prev_item = nk_item

    if is_renzoku:
        ans_nk_combis_cnt += 1
        # ans_nk_combis.append(nk_list)

print(ans_nk_combis_cnt)
# print(len(ans_nk_combis))

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/diverta2019/tasks/diverta2019_a
import itertools

intext = input()
[n, k] = map(int, intext.split())

int_list = [v for v in range(1, n+1)]
nk_combis = itertools.combinations(int_list, k)
ans_nk_combis = []

for nk_combi in nk_combis:
    # print(nk_combi) #
    nk_list = list(nk_combi)
    # nk_list.sort()

    prev_item = None
    is_renzoku = True

    for nk_item in nk_list:
        # print(prev_item, nk_item)
        if (prev_item != None) and (prev_item + 1 != nk_item):
            is_renzoku = False
            break
        prev_item = nk_item

    if is_renzoku:
        ans_nk_combis.append(nk_list)

# print(ans_nk_combis)
print(len(ans_nk_combis))

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/diverta2019/tasks/diverta2019_a
import itertools

intext = input()
[n, k] = map(int, intext.split())

int_list = [v for v in range(1, n+1)]
nk_combis = itertools.combinations(int_list, k)
ans_nk_combis = []

for nk_combi in nk_combis:
    # print(nk_combi) #
    nk_list = list(nk_combi)
    # nk_list.sort()

    prev_item = None
    is_renzoku = True

    for nk_item in nk_list:
        # print(prev_item, nk_item)
        if prev_item == None:
            prev_item = nk_item
            continue
        if prev_item + 1 != nk_item:
            is_renzoku = False
            break
        prev_item = nk_item

    if is_renzoku:
        ans_nk_combis.append(nk_list)

# print(ans_nk_combis)
print(len(ans_nk_combis))

Submission status: Time Limit Exceeded

Solution code:
import itertools
import math

if __name__ == '__main__':
    N, K = map(int, input().split())

    answer = 0
    for c in list(itertools.combinations(range(1, N+1), K)):
        c_list = sorted(list(c))
        min_c_element = min(c_list)
        continue_num = list(range(min_c_element, min_c_element + K))
        if c_list == continue_num:
            answer += 1
    print(answer)

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/diverta2019/tasks/diverta2019_a
import itertools

intext = input()
[n, k] = map(int, intext.split())

int_list = [v for v in range(1, n+1)]
nk_combis = itertools.combinations(int_list, k)
ans_nk_combis = []

for nk_combi in nk_combis:
    # print(nk_combi) #
    nk_list = list(nk_combi)
    nk_list.sort()

    prev_item = None
    is_renzoku = True

    for nk_item in nk_list:
        # print(prev_item, nk_item)
        if prev_item == None:
            prev_item = nk_item
            continue
        if prev_item + 1 != nk_item:
            is_renzoku = False
            break
        prev_item = nk_item

    if is_renzoku:
        ans_nk_combis.append(nk_list)

# print(ans_nk_combis)
print(len(ans_nk_combis))

Submission status: Time Limit Exceeded

Solution code:
#!/usr/bin/env python3
# Atcoder necoak answer
# https://atcoder.jp/contests/diverta2019/tasks/diverta2019_a
import itertools

intext = input()
[n, k] = map(int, intext.split())

int_list = [v for v in range(1, n+1)]
nk_combis = itertools.combinations(int_list, k)
ans_nk_combis = []

for nk_combi in nk_combis:
    # print(nk_combi) #
    nk_list = list(nk_combi)
    nk_list.sort()

    prev_item = None
    is_renzoku = True

    for nk_item in nk_list:
        # print(prev_item, nk_item)
        if prev_item == None:
            prev_item = nk_item
            continue
        if prev_item + 1 != nk_item:
            # print('++', prev_item, nk_item, '++')
            is_renzoku = False
        prev_item = nk_item

    # print(is_renzoku)
    if is_renzoku:
        ans_nk_combis.append(nk_list)

# print(ans_nk_combis)
print(len(ans_nk_combis))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(a-b+1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a - b  + 1)

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
print(N - K + 1)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
print(n-k+1)

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
print(n-k+1)

Submission status: Accepted

Solution code:
def L():
    return list(map(int, input().split()))

[N,K]=L()


print(N-K+1)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
print(n - k + 1)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(a-b+1)

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
print(N-K+1)

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
print(N-K+1)

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
print(n-k+1)

Submission status: Accepted

Solution code:
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


N,K = MI()
print(N-K+1)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, K = mapint()
print(N-K+1)

Submission status: Accepted

Solution code:
N, K = map(int, input().split())

print(N - K + 1)

Submission status: Accepted

Solution code:
def LI():
    return list(map(int, input().split()))


N, K = LI()
print(N-K+1)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
readline = sys.stdin.buffer.readline
read = sys.stdin.readline  # 文字列読み込む時はこっち
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def a_int(): return int(readline())


def ints(): return list(map(int, readline().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, readline().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, readline().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, readline().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from functools import reduce
from math import gcd


def lcm(a, b):
    # 最小公倍数
    g = gcd(a, b)
    return a // g * b


N, K = ints()
print(N - K + 1)

Submission status: Accepted

Solution code:
import sys

N, K = map(int, sys.stdin.readline().split())
print(N - K + 1)

Submission status: Accepted

Solution code:
N,K=map(int,input().split())
ans=1
for i in range(N-K):
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
'''
Created on 2020/09/03

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  N,K=map(int,pin().split())
  print(N-K+1)
  return 
main()

Submission status: Accepted

Solution code:
n,k=map(int,input().split())

print(n-k+1)

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
print(N-K+1)

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし


N,K = MI()
print(N-K+1)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
def input():
    return sys.stdin.readline()[:-1]

def main():
    N, K = map(int, input().split())

    print(N - K + 1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, k = map(int, input().split(' '))
print(n-k+1)

Submission status: Accepted

Solution code:
import sys, math
from functools import lru_cache
import numpy as np
import heapq
from collections import defaultdict
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


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


def main():
    N, K = mi()
    print(N-K+1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N,K = map (int, input ().split ())
print (N-K+1)

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(a-b+1)

Submission status: Accepted

Solution code:
def main():
    n, k = map(int, input().split())

    print(n - k + 1)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n,k = map(int, raw_input().split())
print n - k +1

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(a - b + 1)

Submission status: Accepted

Solution code:
n,k = map(int,input().split())

print(n-k+1)

Submission status: Accepted

Solution code:
'''
Created on 2020/08/20

@author: harurun
'''
def main():
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  N,K=map(int,pin().split())
  print(N-K+1)
  return 

main()

Submission status: Accepted

Solution code:
#diverta 2019 Programming Contest a
n,k=map(int,input().split())
ans=n-k+1
print(ans)

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
print(n-k+1)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())

print(n-k+1)

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
print(str(N-K+1))

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N, K = map(int, readline().split())
    print(N-K+1)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N, K = [int(i) for i in input().split()]
print(N - K + 1)

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n,k=mp()
print(n-k+1)

Submission status: Accepted

Solution code:
import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
    n, k = map(int, readline().rstrip().split())
    print(n - k + 1)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
print(n - k + 1)

Submission status: Accepted

Solution code:
N, K = map(int,input().split())

print(N - K + 1)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
ans = n - k + 1
print(ans)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


def main():
    N, K = map(int, input().split())
    ans = N - K + 1
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
print(N-K+1)

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, K = LI()

    print(N - K + 1)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
print(eval(input().replace(' ','-'))+1)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
ans = n - k + 1
print(ans)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())

print(n-k+1)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
print(n-(k-1))

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
print(n - k + 1)

Submission status: Accepted

Solution code:
n, k = [int(_) for _ in input().split()]
print(n-k+1)

Submission status: Accepted

Solution code:
N, K=map(int, input().split())
print(N-K+1)

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

a, b = I()
print(a-b+1)

Submission status: Accepted

Solution code:
n,k=map(int,input().split());print(n-k+1)

Submission status: Accepted

Solution code:
n,k=map(int, input().split())
print(n-k+1)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,K=MI()
    print(N-K+1)

main()

Submission status: Accepted

Solution code:
def main():
    N, K = map(int, input().split())
    ans = N - K + 1
    print(ans)



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N,K = map(int,input().split())

print(N-(K-1))