Problem:


Score : 100 points

Problem Statement

There is an N-car train.

You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."

Constraints

1 \leq N \leq 100

1 \leq i \leq N

Input

Input is given from Standard Input in the following format:

N i

Output

Print the answer.

Sample Input 1

4 2

Sample Output 1

3

The second car from the front of a 4-car train is the third car from the back.

Sample Input 2

1 1

Sample Output 2

1

Sample Input 3

15 11

Sample Output 3

5



Sample input:
4 2


Sample output:
3

Submission status: Runtime Error

Solution code:

n, k = map(int, input().split())
li = list(map(int, input().split()))
li.append(0)
li.sort()
zero_index = li.index(0)
if zero_index == 0:
    print(li[k])
elif zero_index == len(li) -1:
    print(abs(li[-k-1]))
else:
    near_zero_small = li[zero_index-1]
    near_zero_big = li[zero_index+1]
    li.pop(zero_index)
    ans = 0
    cost = 0
    for i in range(n):
        minimam = li[i]
        maximam = li[i+k-1]
        if (minimam > 0 and maximam > 0 ):
            if minimam == near_zero_big:
                cost = maximam
        elif (minimam < 0 and maximam < 0 ):
            if minimam == near_zero_big:
                cost = abs(minimam)
        else:
            cost = min(abs(minimam), maximam)*2 + max(abs(minimam), maximam)
        if ans > cost or ans == 0:
            ans = cost
    print(ans)

Submission status: Runtime Error

Solution code:
n,i = map(int, input())
print(n-i+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,i = map(int,input())
print(n-i+1)

Submission status: Runtime Error

Solution code:
from bisect import bisect_left

n, k = map(int, input().split())
x = list(map(int, input().split()))
if 0 in x:
    x.remove(0)
    k -= 1
    n -= 1

if n == 0:
    print(0)
else:
    si = bisect_left(x, 0)

    ans = x[-1] - x[0]
    if si + k - 1 < len(x):
        ans = min(ans, x[si + k - 1])
    if si - k >= 0:
        ans = min(ans, abs(x[si - k]))

    for i in range(n):
        tmp_ans = 0
        if i < si and i + k -1 < len(x):
            tmp_ans = abs(x[i]) * 2 + x[i + k - 1]
            ans = min(ans, tmp_ans)
        elif i - k + 1 >= 0:
            tmp_ans = x[i] * 2 + abs(x[i - k + 1])
            ans = min(ans, tmp_ans)

    print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if N = 1:
    print(N)
else:
    print(N - i + 1)

Submission status: Runtime Error

Solution code:
input_a = int(input())
input_b = int(input())

print(input_a - input_b + 1)

Submission status: Runtime Error

Solution code:

def main():
    # parse
    N, i = parse() 
    # compute
    result = compute(N, i)
    # show result
    print(result)

def compute(N, i):
    return N + 1 - i

def parse():
    vars = split_stdin(get_stdin())
    return vars[0], vars[1] 

def get_stdin():
    return input()

def split_stdin(stdin_val, delim = ' '):
    return [x for x in stdin_val.split(delim) if x != '']

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
X = list(map(int,input().split()))
a = []
for i in range(N-K+1):
    l = X[i]
    r = X[i+K-1]
    a.append(min(abs(r)+abs(r-l), abs(l)+abs(l-r)))
print(min(a))

Submission status: Runtime Error

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

print(N-(i-1)

Submission status: Runtime Error

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

print(N-(i-1)

Submission status: Runtime Error

Solution code:
プ
 問題
 質問
 提出
 提出一覧
 順位表
 コードテスト
 解説
提出 #5696340

ソースコード 

Copy
Copy
# 入力
H,W=map(int,input().split())
 
l=[]
for i in range(H):
  x=input()
  # 白いマスのみからなる場合は追加しない
  if x!='.'*W:
    l.append(x)
 
rm=[]
for i in range(W):
  # フラグ
  f=True
  for j in range(len(l)):
    if l[j][i]=='#':
      f=False
 
  # 取り除く列の添字を保存しておく
  if f:
    rm.append(i)
 
a=[]
for x in l:
  for i in rm[::-1]:
    x=x[:i]+x[i+1:]
  a.append(''.join(x))
 
# 出力
for i in range(len(a)):
  print(''.join(a[i]))

Submission status: Runtime Error

Solution code:
#include<iostream>
using namespace std;

int main(){
  int n, i;
  cin >> n >> i;
  cout << n - i + 1 << endl;
  return 0;
}

Submission status: Runtime Error

Solution code:
from sys import stdin

H, W = [int(x) for x in stdin.readline().rstrip().split()]

A = [list(stdin.readline().rstrip()) for _ in range(H)]
result = A

delete_column = []
delete_row = []

for k in range(W):
    cnt = 0
    for l in A[k]:
        if l == '.':
            cnt += 1
    if cnt == len(A[k]):
        delete_row.append(k)

for k in range(W):
    cnt = 0
    for l in range(H):
        if A[l][k] == '.':
            cnt += 1
    if cnt == H:
        delete_column.append(k)

for x in delete_row:
    del result[x]

for x in delete_column:
    for y in range(len(A)):
        del result[y][x]

for x in result:
    print(''.join(x))

Submission status: Runtime Error

Solution code:
rom sys import stdin

N, i = [int(x) for x in stdin.readline().rstrip().split()]

print(N + 1 - i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
i = int(input())
print(int(N+1-i))

Submission status: Runtime Error

Solution code:
N = int(input())
i = int(input())
print(N+1-i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
i=int(input())
print(N-i+1)

Submission status: Runtime Error

Solution code:
N=int(input())
i=int(input())
print(N-i+1)

Submission status: Runtime Error

Solution code:
i,j=map(int, input())
print(i-j+1)

Submission status: Runtime Error

Solution code:
print(int(input())+1-int(input()))

Submission status: Runtime Error

Solution code:
n, i = map(int, input())

print(n-i+1)

Submission status: Runtime Error

Solution code:
N =input(int())
i =input(int())
print(int(N+1-i))

Submission status: Runtime Error

Solution code:
N =input(int())
a =input(int())
print(N-a+1)

Submission status: Runtime Error

Solution code:
N, i = map(int, input(), input())
print(N-i+1)

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
li=list(map(int,input().split()))
q=[]
if k==n:
  q.append(li[n-1]-li[0]+min(li[n-1],abs(li[0])))
else:
  for i in range(k,n+1):
    if li[i-1]<=0:
      q.append(-li[i-k])
    elif li[i-k]>=0:
      q.append(li[i-1])
    else:
      q.append(li[i-1]-li[i-k]+min(li[i-1],abs(li[i-k])))
print(min(q))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
li=list(map(int,input().split()))
q=[]
for i in range(k,n):
  if li[i-1]<=0:
    q.append(-li[i-k])
  elif li[i-k]>=0:
    q.append(li[i-1])
  else:
    q.append(li[i-1]-li[i-k]+min(li[i-1],abs(li[i-k])))
print(min(q))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
li=list(map(int,input().split()))
q=[]
for i in range(k,n):
  if li[i-1]<0:
    q.append(-li[i-k])
  elif li[i-k]>0:
    q.append(li[i-1])
  else:
    q.append(li[i-1]-li[i-k]+min(li[i-1],abs(li[i-k])))
print(min(q))

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
li=list(map(int,input().split()))
q=[]
for i in range(k,n):
  if li[i-1]<0 or li[i-k]>0:
    q.append(li[i-1]-li[i-k])
  else:
    q.append(li[i-1]-li[i-k]+min(li[i-1],abs(li[i-k])))
print(min(q))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, i = map(int,input().spkit(' '))
print(N-i+1)

Submission status: Runtime Error

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

print(n-k+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,i=map(int,input())
print(n+1-i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
median_len=N*(N+1)//2
median=median_len//2+1
a=1
medin_rank=1
for i in range(1,N):
    a=i*(i+1)//2
    b=(i+2)*(i+1)//2
    if a<=median and b>median:
        medin_rank=i
        break
rank_index=median-a
median_list=[]
l=medin_rank//2
for i in range(N-medin_rank):
    median_list.append(A[l+i])
print(median_list[rank_index])

Submission status: Runtime Error

Solution code:
import sys

def main():
  input = sys.stdin.readline
  n, i = map(int, input().split())
  print(N-i+1)


if __name__ == '__main__':
  main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin
import numpy as np

N, i = map(int, raw_input().split() )
print n-1 + 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, i = map(int, input())
print(n - i + 1)

Submission status: Runtime Error

Solution code:
H, W = map( int, input().split())

a = []
b = []
c = []

for i in range(H):
  a1 = input()
  if('#' in a1):
     a.append(a1)
        
  else:
      continue

a = list(zip(*a))
l1 = len(a)
         
for j in range(l1):
  b1 = a[j]
   
  if( '#' in b1):
      b.append(b1)
  
  else:
      continue
         
c = list(zip(*b))
l2 = len(c)

for n in range(l2):
         print("".join(c[n]))

Submission status: Runtime Error

Solution code:
n, i = map(int,input().aplit())

print(n - i + 1)

Submission status: Runtime Error

Solution code:
N,i = list(map(int,input()))
print(N-i+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=list(map(int,input().split()))
    print(s[0]-s[1]+1)

Submission status: Runtime Error

Solution code:
h,w=map(int,input().split())
lst=list(input() for i in range(h))
n_h=h
for i in range(len(lst)):
    if "#" not in lst[h-i-1]:
        n_h-=1
        lst.pop(h-i-1)
lst=list(map(list,lst))
for i in range(w):
    T=True
    for b in range(n_h):
        if lst[b][w-i-1]=="#":
            T=False
            break
    if T:
        for b in range(h):
            lst[b].pop(w-i-1)
for a in lst:
    print("".join(a))

Submission status: Runtime Error

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

ans = 3 * (10 ** 8) + 1
for i in range(N - K + 1):
    l = x[i]
    r = x[i+K-1]
    ans = min([ans, abs(l) + r - l, abs(r) + r - l])

print(ans)

Submission status: Runtime Error

Solution code:
N, i = input().split(" ")
print(N - i + 1)

Submission status: Runtime Error

Solution code:
import sys

N, K = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]

r = 0
for idx, xi in enumerate(x):
    r = idx


list = []

S = r - K
if x[r] == 0:
    S += 1
S = max(S, 0)

for s in range(S, r+1):
    e = s + K - 1
    if len(x) <= e:
        break
    list.append(abs(x[e] - x[s]) + abs(x[s]))
    list.append(abs(x[e] - x[s]) + abs(x[e]))

print(min(list))

sys.exit(0)

Submission status: Runtime Error

Solution code:
n,i=int(input("enter the numbers"))
x=n-i+1
Print("the result")
print(x)

Submission status: Runtime Error

Solution code:
N,i=int(input ("enter the number of cars and car ))
X=N-i+1
Print(x)

Submission status: Runtime Error

Solution code:
There is an N-car train.

You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."

Submission status: Runtime Error

Solution code:
totalnumber,numberfromfront=map(int, input().split())
numberfromback=totalnumber-numberfromfront+1
print(j)

Submission status: Runtime Error

Solution code:
l = list(map(input().split()))
print(l[0]-l[1]+1)

Submission status: Runtime Error

Solution code:
N = int(input("enter the number of cars: "))
i = int(input("enter the front of the train "))
if (1<=N and N<=100) or (1<=i and i<=N):
    i  = N - i +1
    print(i)

Submission status: Runtime Error

Solution code:
N,i=map(int,input().split())
if 1<=n<=100:
if 1<=i<=n:
print(N-i+1)

Submission status: Runtime Error

Solution code:
N= int(input())
i= int(input())

print (N-i+1)

Submission status: Runtime Error

Solution code:
N= int(input())
i= int(input())

j=N-i+1

print (j)

Submission status: Runtime Error

Solution code:
N=int(input())
i=int(input())
j=o

j=N-i+1

print(j)

Submission status: Runtime Error

Solution code:
N= int(input())
i= int(input())
j=0

j=N-i+1

print (j)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N , i = map( int input( ) )
x = (N - i) + 1
print ( x )

Submission status: Runtime Error

Solution code:
N , i = map( int input( ) )
x = N - i + 1
print ( x )

Submission status: Runtime Error

Solution code:
h,w = map(int,input().split())
map_ = list()
for i in range(h):
    map_.append(list(input()))
flag = True
while flag:

    flag = False

    for ii in range(len(map_)):
        if set(map_[ii]) == {"."}:
            del map_[ii]
            flag = True
            break

    map_t = [list(x) for x in zip(*map_)]

    for ii in range(len(map_t)):
        if set(map_t[ii]) == {"."}:
            del map_t[ii]
            flag = True
            break

    map_ = [list(x) for x in zip(*map_t)]


for iiii in map_:
    print(*iiii,sep="")

Submission status: Runtime Error

Solution code:
n =int(input("enter number of car_train. "))
i = int(input("enter ith from the front  of train . "))

if n == i:
    print (1)
else :
    print ((n-i)+1)

Submission status: Runtime Error

Solution code:
n =int(input("enter number of car_train. "))
i = int(input("enter ith from the front  of train . "))
def train(n ,i):
    if n == i:
        print (1)
    else :
        print ((n-i)+1)



train(n,i)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
i = int(input())

print u N-i+1

Submission status: Runtime Error

Solution code:
N = int(input())
i = int(input())

print N-i+1

Submission status: Runtime Error

Solution code:
N = int(input())
i = int(input())

print(N-i+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,i = int(input())
print(n-(i-1))

Submission status: Runtime Error

Solution code:
a,b=input(),input()
c=int(a)-int(b)+1
print(c)

Submission status: Runtime Error

Solution code:
(a,b)=input(),input()
c=int(a)-int(b)+1
print(c)

Submission status: Runtime Error

Solution code:
(a,b)=input(),input()
c=a-b+1
print(c)

Submission status: Runtime Error

Solution code:
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()

Submission status: Runtime Error

Solution code:
N,i=map(int,input())

a=(N-i+1)

print(a)

Submission status: Runtime Error

Solution code:
H,W= map(int,raw_input().split())

M = []
for i in range(H):
	M.append(raw_input())
	
flag_list_H = []
for i in range(H):
	if '#' in M[i]:
		flag_list_H.append(True)
	else:
		flag_list_H.append(False)

flag_list_W = []
for i in range(W):
	flag = False
	for j in range(H):
		if M[j][i]=='#':
			flag=True
	flag_list_W.append(flag)

for i in range(H):
	answer = ""
	for j in range(W):
		if flag_list_H[i] and flag_list_W[j]:
			answer+=M[i][j] + " "
	print answer[:-1]

Submission status: Runtime Error

Solution code:
import sys

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

    min_dis = sys.maxsize
    for i in range(0,N-K+1):
        l = i
        r = i + K - 1 
        # 左に行った後に右に行くパターン
        dis_l = abs(x[l]) + abs(x[r]-x[l])
        # 右に行った後に左に行くパターン
        dis_r = abs(x[r]) + abs(x[r]-x[l])
        min_dis = min(min_dis,dis_l,dis_r)
    print(min_dis)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
i = int(input())
print(N - i + 1)

Submission status: Runtime Error

Solution code:
k=int(input())
print(int((k/2)**2) if k%2==0 else int(((k/2)-0.5)*((k/2)+0.5)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input("N: ")
i = input("i: ")

print(N - i)

Submission status: Runtime Error

Solution code:
N,i=map(int,input())
print(N-i+1)

Submission status: Runtime Error

Solution code:
import math
N,K = map(int, input().split())
a = list(map(int,input().split()))
l = 0
r = K - 1
Min = float("inf")
for i in range(N - K + 1):
    if(a[l]*a[r]<=0):#原点を跨ぐとき
        Min = min(Min,abs(a[l])+abs(a[l]-a[r]),abs(a[r])+abs(a[r]-a[l]))
    elif(l==0):#左端の時
        if(a[r]*a[r+1]<0 or a[0]>0):
            Min = min(Min,abs(a[l])+abs(a[l]-a[r]),abs(a[r])+abs(a[r]-a[l]))
    elif(r==N-1):#右端の時
        if(a[l-1]*a[l]<0 or a[l]>0):
            Min = min(Min,abs(a[l])+abs(a[l]-a[r]),abs(a[r])+abs(a[r]-a[l]))
    else:
        if(a[r]*a[r+1]<0 or a[l-1]*a[l]<0):
            Min = min(Min,abs(a[l])+abs(a[l]-a[r]),abs(a[r])+abs(a[r]-a[l]))
    l = l + 1
    r = r + 1
print(Min)

Submission status: Runtime Error

Solution code:
l = raw_input().split()
N = l[0]
i = l[1]
print(N + 1 - i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())

ans = a - b + 1
print(ans)

Submission status: Runtime Error

Solution code:
h, w = map(int, input().split())
a = [input() for w in range(h)]

for i in range(h)[::-1]:
    if "#" not in a[i]:
        del a[i]
        h -= 1

n = []
for j in range(w):
    m = ["".join(t[j] for t in a)]
    if "#" in m[0]:
        n += m

for k in range(h):
    print("".join(u[k] for u in n))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b;main(){scanf("%d%d",&a,&b);printf("%d",a-b+1);}

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
 f, r = map(int, raw_input().split())
print(f - r + 1)

Submission status: Runtime Error

Solution code:
    l = raw_input().split()
    f = int(l[0])
    r = int(l[1])

    a = f-r+1

    print(a)

Submission status: Runtime Error

Solution code:
a, b = list(input().strip().split(" ")

print(b-a+1)

Submission status: Runtime Error

Solution code:
import numpy as np

H, W = map(int, input().split(" "))

lines = np.asarray([list(input().replace("\n", "")) for h in range(H)])

h_indexs, w_indexs = map(set, np.where(lines == "#"))

outlines = lines[list(h_indexs), :][:, list(w_indexs)]
for outline in outlines:
    print("".join(outline))

Submission status: Runtime Error

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

l = 0
r = k-1
mnm = 1000100010
while r<n:
    a = abs(x[l])+abs(x[l]-x[r])
    b = abs(x[r])+abs(x[r]-x[l])
    if a<=b:
        if a < mnm:
            mnm = a
    else:
        if b < mnm:
            mnm = b
    l += 1
    r += 1
print(mnm)

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
X=list(map(int,input().split()))
hidari=0
migi=N-1
if N-K!=0:
    for i in range(N-K):
      if abs(X[hidari])>=abs(X[migi]):
        hidari=hidari+1
      else:
        migi=migi-1

if X[hidari]<0 and X[migi]>0:
  if abs(X[hidari])>=abs(X[migi]):
    print(2*abs(X[migi])+abs(X[hidari]))
  else:
    print(2*abs(X[hidari])+abs(X[migi]))
else:
  if abs(X[hidari])>=abs(X[migi]):
    print(abs(X[hidari]))
  else:
    print(abs(X[migi]))

Submission status: Runtime Error

Solution code:
n=int(input())
nums=[int(x) for x in input().split()]

def findMedian(nums):
    size=len(nums)
    mIndex = (size*(size+1)//2) + 1
    gap=0
    mValue=0
    while mIndex>0 and gap<size:
        start=0
        end=start+gap
        while end<size and mIndex>0:
            mIndex-=1
            mValue=nums[(start+end+1)//2]
            start+=1
            end+=1
        gap+=1
    return mValue

print(findMedian(nums))

Submission status: Runtime Error

Solution code:
i = list(map(int,input(),split()))
print(i[0] - i[1] + 1)

Submission status: Runtime Error

Solution code:
n, i = map(int,input().sprit(" "))
ans = n - i + 1
print(ans)

Submission status: Runtime Error

Solution code:
N,i = map(int,input())
print(N-i+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!

N,A=map(int,input()split())
print(N-A+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main():
    N = int(input())
    i = int(input())
    output = solve(N, i)
    print(output)
    return

#________________________________________
#  Solve
#________________________________________
def solve(N, i):
    """
    解答のコード
    """
    return N - i + 1
#________________________________________


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
line = input().split()
N = int(line[0])
i = int(line[1])

print(n-i+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N , i = map(int, input())

print(N - i + 1)

Submission status: Runtime Error

Solution code:
N , M = map(int, input())
print(N-M+1)