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: Accepted

Solution code:
def getN():
    return int(input())

def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0],b[1]

def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b

N, M =getMN()
print(N-M+1)

Submission status: Accepted

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

print(n+1-i)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

print(n - i + 1)

Submission status: Accepted

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

ans = N - i + 1
print(ans)

Submission status: Accepted

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

print(N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m, q=map(int, input().split())

print(m-q+1)

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, i = map(int, input().strip().split(" "))

print(N-i+1)

Submission status: Accepted

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

print(str(N - i + 1))

Submission status: Accepted

Solution code:
#-*-coding:utf-8-*-

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

nums = [int(num) for num in input().split()]
n = nums[0]
i = nums[1]



print(n-i+1)

Submission status: Accepted

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

n, i = na()
print(n-i+1)

Submission status: Accepted

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

print(N-i+1)

Submission status: Accepted

Solution code:
n, i = [int(_) for _ in input().split()]

print(n + 1 - i)

Submission status: Accepted

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

Submission status: Accepted

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

print(n-i+1)

Submission status: Accepted

Solution code:
inp = input()
 
data = inp.split()

ans = int(data[0])-int(data[1])+1
print(ans)

Submission status: Accepted

Solution code:

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

    print(N - i + 1)

if __name__ == "__main__":
        main()

Submission status: Accepted

Solution code:
a,b = map(int,input().split())

print(a-b+1)

Submission status: Accepted

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

print(n-i+1)

Submission status: Accepted

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

print(N - i + 1)

Submission status: Accepted

Solution code:
n, i = [int(i) for i in input().split()]

print(n-(i-1))

Submission status: Accepted

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

print(n+1-i)

Submission status: Accepted

Solution code:
import numpy as np
import math

N, i = map(int, input().split())

print(N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

INF = float('inf')


def inpl(): return list(map(int, input().split()))


a, b = inpl()

print(a - b + 1)

Submission status: Accepted

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

print(N - i + 1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math,string,itertools,fractions,heapq,collections,re,array,bisect

def s():
    return input()
def n():
    return int(input())
def d():
    return float(input())

def ls():
    return input().split()
def ln():
    return map(int, input().split())
def ld():
    return map(float, input().split())

def fs():
    return [input() for i in range(input())]
def fn():
    return [int(input()) for i in range(input())]
def fd():
    return [float(input()) for i in range(input())]

N,i = ln()



print(N-i+1)

Submission status: Accepted

Solution code:
def abc107_a():
    import sys
    input = sys.stdin.readline

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

    return n - i + 1


print(abc107_a())

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

Solution code:
# cook your dish here
x,y = map(int,input().split())	
print(x-y+1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int,raw_input().split())

print a-b+1

Submission status: Accepted

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

print(N+1-i)

Submission status: Accepted

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

ans = N - i + 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

print(n-i+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
N,i = map(int,input().split())
array = [ x for x in range(N) ]
if not ( 1 <= N <= 100 and 1 <= i <= N ):
    sys.exit()

for I in range(N):
    if array[i] == array[-I]:
        print(I+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
h,w=map(int,input().split())
icon=list()
for i in range(h):
    icon.append(list(input().split()))

row=[False]*h
col=[False]*w

for i in range(h):
    for j in range(w):
        if icon[i][j]=='#':
            row[i]=True
            col[j]=True

for  i in range(h):
    if row[i]==True:
        for j in range(w):
            if col[j]==True:
                print(icon[i][j],end='')
        print()

Submission status: Runtime Error

Solution code:
def actual(n, i):
    return n - i + 1

n, i = map(int, input())
print(actual(n, i))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
print(a+1-b)
//Source code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 charactersSource code should be longer than 50 characters

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

Solution code:
mod = 10 ** 9 + 7
mod2 = 2**61+1
from collections import deque
import heapq
from bisect import bisect_left, insort_left, bisect_right

def iip(listed=True):
    ret = [int(i) for i in input().split()]
    if len(ret) == 1 and not listed:
        return ret[0]
    return ret

def iip_ord():
    return [ord(i) - ord("a") for i in input()]


def main():
    ans = solve()
    if ans is not None:
        print(ans)

def solve():
    N, K = iip(False)
    X = iip()

    A1 = [i for i in X if i > 0]
    A2 = [-i for i in X if i < 0]
    A2.sort()
    if 0 in X:
        K -= 1
        if K == 0:
            return 0

    ans = 10**50

    if K == 1:
        return min(A1[0], A2[0])

    for i in range(N):
        i1 = i-1
        i2 = K-i-1

        #print(i1, i2, len(A1), len(A2))
        #print(A1, A2)
        if i1 < -1 or i2 < -1 or i1 >= len(A1) or i2 >= len(A2):
            continue

        if i1 == -1:
            a = 0
        else:
            a = A1[i1]

        if i2 == -1:
            b = 0
        else:
            b = A2[i2]

        ans = min(ans, a*2+b, b*2+a)

    try:
        ans = min(A1[K-1], ans)
    except:
        pass

    try:
        ans = min(A2[K-1], ans)
    except:
        pass

    #print(A1)
    #print(A2)
    print(ans)


#####################################################ライブラリ集ここから

def YesNo(s):
    if s:
        print("Yes")
    else:
        print("No")


def fprint(s):
    for i in s:
        print(i)

def split_print_space(s):
    print(" ".join([str(i) for i in s]))


def split_print_enter(s):
    print("\n".join([str(i) for i in s]))


def koenai_saidai_x_index(sorted_list, n):
    l = 0
    r = len(sorted_list)
    if len(sorted_list) == 0:
        return False
    if sorted_list[0] > n:
        return False

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] == n:
            return x
        elif sorted_list[x] > n:
            r = x
        else:
            l = x
    return l


def searchsorted(sorted_list, n, side):
    if side not in ["right", "left"]:
        raise Exception("sideはrightかleftで指定してください")

    l = 0
    r = len(sorted_list)

    if n > sorted_list[-1]:
        # print(sorted_list)
        return len(sorted_list)
    if n < sorted_list[0]:
        return 0

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] > n:
            r = x
        elif sorted_list[x] < n:
            l = x
        else:
            if side == "left":
                r = x
            elif side == "right":
                l = x

    if side == "left":
        if sorted_list[l] == n:
            return r - 1
        else:
            return r

    if side == "right":
        if sorted_list[l] == n:
            return l + 1
        else:
            return l


def soinsuu_bunkai(n):
    ret = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):
    if n <= 0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n - r + 1, n + 1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r + 1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        # print(f"{n}C{r} = {ret}")
        pass
    return ret


def inv(n, mod):
    return power(n, mod - 2)


def power(n, p, mod_= mod):
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p // 2, mod_) ** 2) % mod_
    if p % 2 == 1:
        return (n * power(n, p - 1, mod_)) % mod_


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
mod = 10 ** 9 + 7
mod2 = 2**61+1
from collections import deque
import heapq
from bisect import bisect_left, insort_left, bisect_right

def iip(listed=True):
    ret = [int(i) for i in input().split()]
    if len(ret) == 1 and not listed:
        return ret[0]
    return ret

def iip_ord():
    return [ord(i) - ord("a") for i in input()]


def main():
    ans = solve()
    if ans is not None:
        print(ans)

def solve():
    N, K = iip(False)
    X = iip()

    A1 = [i for i in X if i > 0]
    A2 = [-i for i in X if i < 0]
    A2.sort()
    if 0 in X:
        K -= 1
        if K == 0:
            return 0

    ans = 10**50
    if len(A1) >= K:
        ans = A1[K-1]
    if len(A2) >= K:
        ans = min(A2[K-1], ans)

    for i in range(1, 10**10):
        i1 = i-1
        i2 = K-i-1
        if i1 >= len(A1):
            break
        if i2 >= len(A2) or i2 < 0:
            break

        #print(i1, i2)
        ans = min(A1[i1] + A2[i2] * 2, ans)
        ans = min(A1[i1] * 2 + A2[i2], ans)

    #print(A1)
    #print(A2)
    print(ans)


#####################################################ライブラリ集ここから

def YesNo(s):
    if s:
        print("Yes")
    else:
        print("No")


def fprint(s):
    for i in s:
        print(i)

def split_print_space(s):
    print(" ".join([str(i) for i in s]))


def split_print_enter(s):
    print("\n".join([str(i) for i in s]))


def koenai_saidai_x_index(sorted_list, n):
    l = 0
    r = len(sorted_list)
    if len(sorted_list) == 0:
        return False
    if sorted_list[0] > n:
        return False

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] == n:
            return x
        elif sorted_list[x] > n:
            r = x
        else:
            l = x
    return l


def searchsorted(sorted_list, n, side):
    if side not in ["right", "left"]:
        raise Exception("sideはrightかleftで指定してください")

    l = 0
    r = len(sorted_list)

    if n > sorted_list[-1]:
        # print(sorted_list)
        return len(sorted_list)
    if n < sorted_list[0]:
        return 0

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] > n:
            r = x
        elif sorted_list[x] < n:
            l = x
        else:
            if side == "left":
                r = x
            elif side == "right":
                l = x

    if side == "left":
        if sorted_list[l] == n:
            return r - 1
        else:
            return r

    if side == "right":
        if sorted_list[l] == n:
            return l + 1
        else:
            return l


def soinsuu_bunkai(n):
    ret = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):
    if n <= 0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n - r + 1, n + 1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r + 1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        # print(f"{n}C{r} = {ret}")
        pass
    return ret


def inv(n, mod):
    return power(n, mod - 2)


def power(n, p, mod_= mod):
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p // 2, mod_) ** 2) % mod_
    if p % 2 == 1:
        return (n * power(n, p - 1, mod_)) % mod_


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
mod = 10 ** 9 + 7
mod2 = 2**61+1
from collections import deque
import heapq
from bisect import bisect_left, insort_left, bisect_right

def iip(listed=True):
    ret = [int(i) for i in input().split()]
    if len(ret) == 1 and not listed:
        return ret[0]
    return ret

def iip_ord():
    return [ord(i) - ord("a") for i in input()]


def main():
    ans = solve()
    if ans is not None:
        print(ans)

def solve():
    N, K = iip(False)
    X = iip()

    A1 = [i for i in X if i >= 0]
    A2 = [-i for i in X if i < 0]
    A2.sort()

    ans = 10**50
    if len(A1) >= K:
        ans = A1[K-1]
    if len(A2) >= K:
        ans = min(A2[K-1], ans)

    for i in range(1, len(A1)):
        i1 = i-1
        i2 = K-i-1
        if i1 >= len(A1):
            break
        if i2 >= len(A2):
            break
        ans = min(2*A1[i1]+A2[i2], ans)
        ans = min(2*A2[i2]+A1[i1], ans)

    print(ans)


#####################################################ライブラリ集ここから

def YesNo(s):
    if s:
        print("Yes")
    else:
        print("No")


def fprint(s):
    for i in s:
        print(i)

def split_print_space(s):
    print(" ".join([str(i) for i in s]))


def split_print_enter(s):
    print("\n".join([str(i) for i in s]))


def koenai_saidai_x_index(sorted_list, n):
    l = 0
    r = len(sorted_list)
    if len(sorted_list) == 0:
        return False
    if sorted_list[0] > n:
        return False

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] == n:
            return x
        elif sorted_list[x] > n:
            r = x
        else:
            l = x
    return l


def searchsorted(sorted_list, n, side):
    if side not in ["right", "left"]:
        raise Exception("sideはrightかleftで指定してください")

    l = 0
    r = len(sorted_list)

    if n > sorted_list[-1]:
        # print(sorted_list)
        return len(sorted_list)
    if n < sorted_list[0]:
        return 0

    while r - l > 1:
        x = (l + r) // 2
        if sorted_list[x] > n:
            r = x
        elif sorted_list[x] < n:
            l = x
        else:
            if side == "left":
                r = x
            elif side == "right":
                l = x

    if side == "left":
        if sorted_list[l] == n:
            return r - 1
        else:
            return r

    if side == "right":
        if sorted_list[l] == n:
            return l + 1
        else:
            return l


def soinsuu_bunkai(n):
    ret = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            n //= i
            ret.append(i)
        if i > n:
            break
    if n != 1:
        ret.append(n)
    return ret


def conbination(n, r, mod, test=False):
    if n <= 0:
        return 0
    if r == 0:
        return 1
    if r < 0:
        return 0
    if r == 1:
        return n
    ret = 1
    for i in range(n - r + 1, n + 1):
        ret *= i
        ret = ret % mod

    bunbo = 1
    for i in range(1, r + 1):
        bunbo *= i
        bunbo = bunbo % mod

    ret = (ret * inv(bunbo, mod)) % mod
    if test:
        # print(f"{n}C{r} = {ret}")
        pass
    return ret


def inv(n, mod):
    return power(n, mod - 2)


def power(n, p, mod_= mod):
    if p == 0:
        return 1
    if p % 2 == 0:
        return (power(n, p // 2, mod_) ** 2) % mod_
    if p % 2 == 1:
        return (n * power(n, p - 1, mod_)) % mod_


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

answer = N - i + 1

print(answer)

Submission status: Runtime Error

Solution code:
import java.util.*;

public class Main {

    public static void main(String args[]) {

        // 入力
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int i = Integer.parseInt(sc.next());

        // 主処理
        int result = n - i + 1;

        // 出力
        System.out.println(result);
        sc.close();
    }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda x: [ni() for _ in range(x)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda x: [na() for _ in range(x)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda x: [ns() for _ in range(x)]
nas = lambda: stdin.readline().split()

n = ni()
i = ni()

print(n - i + 1)

Submission status: Runtime Error

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

print(N + 1 - i)
hibiki@hibiki-MB-E410

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
H_W = list(map(int,input().split()))
H = H_W[0]
W = H_W[1]
b = [[0 for i in range(W)] for j in range(H)]
a = [[str(c) for c in l.strip()] for l in sys.stdin]

# .を0に, #を1にした新しい配列bを作る
for i in range(H):
    for j in range(W):
        if a[i][j] == '#':
            b[i][j] = 1

# 列と行ごとにすべて0のものを探す
w = [0] * W
h = [0] * H
for i in range(H):
    for j in range(W):
        h[i] = h[i] + b[i][j]
        w[j] = w[j] + b[i][j]

#print(h)
#print(w)
# 全ての要素が0の列と行を削除する
i = 0
c = 0
j = 0
for i in range(H):
    if h[i] == 0:
        del a[j]
        H = H - 1
        j = j - 1
    j = j + 1
#print(a)

k = 0
for i in range(W):
    if w[i] == 0:
        for j in range(H):
            del a[j][k]
        W = W - 1
        k = k - 1
    k = k + 1
#print(a)
# 答え
for i in range(H):
    flag = 0
    for j in range(W):
        if flag == 0:
            ans = a[i][j]
            flag = 1
        else:
            ans = ans + a[i][j]
    print(ans)

Submission status: Runtime Error

Solution code:
import sys
H_W = list(map(int,input().split()))
H = H_W[0]
W = H_W[1]
b = [[0 for i in range(W)] for j in range(H)]
a = [[str(c) for c in l.strip()] for l in sys.stdin]

# .を0に, #を1にした新しい配列bを作る
for i in range(H):
    for j in range(W):
        if a[i][j] == '#':
            b[i][j] = 1

# 列と行ごとにすべて0のものを探す
w = [0] * W
h = [0] * H
for i in range(H):
    for j in range(W):
        h[i] = h[i] + b[i][j]
        w[j] = w[j] + b[i][j]

print(h)
print(w)
# 全ての要素が0の列と行を削除する
i = 0
c = 0
j = 0
for i in range(H):
    if h[i] == 0:
        del a[j]
        H = H - 1
        j = j - 1
    j = j + 1
print(a)

k = 0
for i in range(W):
    if w[i] == 0:
        for j in range(H):
            del a[j][k]
            print(a)
        W = W - 1
        k = k - 1
    k = k + 1
print(a)
# 答え
for i in range(H):
    flag = 0
    for j in range(W):
        if flag == 0:
            ans = a[i][j]
            flag = 1
        else:
            ans = ans + a[i][j]
    print(ans)

Submission status: Runtime Error

Solution code:
def main():
    _, k = map(int, input().split())
    x = tuple(map(int, input().split()))
    print(min(r - l + min(abs(l), abs(r)) for l, r in zip(x, x[k - 1 :])))
 
 
if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

ll = [list(input()) for _ in range(h)]
lh = [h for h in ll if '#' in h]
lw = zip(*[w for w in zip(*lh) if '#' in w])

for l in lw:
  print(''.join(l))

Submission status: Runtime Error

Solution code:
"""
author : halo2halo
date : 23, Jan, 2020
"""

import sys

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N, i = map(int, readline())
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:
a,b=map(int,input.split())
print(a-b+1)

Submission status: Runtime Error

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

print(n-i)

Submission status: Runtime Error

Solution code:
a,b=input().split()
print(a-b+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 = []
for _ in range(h):
    wk = input()

    if '#' in wk:
        a.append(wk)

t = []
for j in zip(*a):
    if '#' in j:
        t.append(j)

for list in zip(*t):
    print("".join(list))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
h, w = map(int, input().split())

A = []
for i in range(h):
    s = list(input())
    if len(set(s)) == 1 and s[0] == ".":
        continue
    else:
        A.append(s)
B = A
c = 0
for i in range(w):
    s = []
    for j in range(len(A)):
        s.append(A[j][i])
    if len(set(s)) == 1 and s[0] == '.':
        B = np.delete(B, i-c, 1)
        c += 1


for i in B:
    a = ""
    for j in i:
        a += j
    print(a)

Submission status: Runtime Error

Solution code:
vdef main():
    n,i = map(int,input().split())

    print(n+1-i)

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:
n i = map(int,input().split())
print(n - i + 1)

Submission status: Runtime Error

Solution code:
A,B = list(map(int,input()))

print(A-B+1)

Submission status: Runtime Error

Solution code:
import bisect
n,k = map(int,input().split())
x = list(map(int,input().split()))
bindex = bisect.bisect_left(x,0)
mainasu = x[:bindex+1]

listr = []
for i in range(len(x)):
  if i == 0:
    listr.append(x[i])
    continue
  listr.append(listr[-1]+x[i])
ans = 10**9
for i in range(n-k+1):
  ans = min(ans,listr[i+k]-listr[i])

print(ans)

Submission status: Runtime Error

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

print(n-1+1)

Submission status: Runtime Error

Solution code:
a

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
if x == y:
    print(y)
else:
    print(y - x + 1)

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
if x == y:
    print(y)
else:
    print(y - x + 1)

Submission status: Runtime Error

Solution code:
x = int(input())
y = int(input())
if x ==y :
    print(y)
else:
    print(y-x+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())


a=int(input())


print(int(n-a+1))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
'''A - Train
https://atcoder.jp/contests/abc107/tasks/abc107_a

>>> main(4, 2)
3
>>> main(1, 1)
1
>>> main(15, 11)
5'''


def main(n, i):
    print(n - i + 1)


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

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:
a=list(map(int(input().split()))
print(a[0]-a[1]+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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())
print(n - i + 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().split())
print(N-i+1)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
na = lambda: list(map(int, stdin.readline().split()))
n, i = na()

print(n - i + 1)

Submission status: Runtime Error

Solution code:
n,i=map(int,input().split())
print(n-p+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("How many cars does this train have? "))

i = int(input("In which car are you? "))


j = N-i+1


print("You are in the car ",end="")
print(j,end="")
print(" counting from the train's back.")

Submission status: Runtime Error

Solution code:
N = int(input("How many cars does this train have? "))

i = int(input("In which car are you? "))


j = N-i+1


print("You are in the car ",end="")
print(j,end="")
print(" counting from the train's back.")
      
      
      # N 1
      # N-1 2
      # N-i donne 1+i
      # 10 1
      # 9 2
      # 8 3

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:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac

setrecursionlimit(1000000)


def main():
	a,b = map(int,input())
	print(a-b+1)

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Submission status: Runtime Error

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

print(a-b+1)

Submission status: Runtime Error

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