Problem:
 Score : 200 points    Problem Statement Joisino is working as a receptionist at a theater.  The theater has 100000 seats, numbered from 1 to 100000 .  According to her memo, N groups of audiences have come so far, and the i -th group occupies the consecutive seats from Seat l_i to Seat r_i (inclusive).  How many people are sitting at the theater now?      Constraints  1≤N≤1000  1≤l_i≤r_i≤100000  No seat is occupied by more than one person.  All input values are integers.         Input Input is given from Standard Input in the following format:  N  l_1  r_1  :  l_N  r_N       Output Print the number of people sitting at the theater.        Sample Input 1 1
24 30      Sample Output 1 7  There are 7 people, sitting at Seat 24,25,26,27,28,29 and 30 .       Sample Input 2 2
6 8
3 3      Sample Output 2 4

Solution (Python):
N = int(input())
ans = 0
for i in range(N):
    li,ri = map(int,input().split())
    ans += ri - li + 1
print(ans)

Solution (Python):
N = int(input())
num = 0

for i in range(N):
    s, l = map(int, input().split())
    ans = l - s + 1
    num += ans

print(num)

Solution (Python):

def get_ln_inputs():
    return input().split()


def get_ln_int_inputs():
    return list(map(int, get_ln_inputs()))


def main():
    N = get_ln_int_inputs()[0]
    l = list()
    r = list()
    for _ in range(N):
        l_i, r_i = get_ln_int_inputs()
        l.append(l_i)
        r.append(r_i)
    print(sum(r) - sum(l) + N)
    return


main()

Solution (Python):
N=int(input())

ans=0

for i in range(N):
	a=[int(i) for i in input().split()]
	ans+=(a[1]-a[0]+1)
print(ans)

Solution (Python):

N = int(input())
res = 0
for _ in range(N):
    l, r = map(int, input().split())
    res += r - l + 1
    
print(res)

Solution (Python):
n = int(input())
total = 0
for i in range(n):
    l,r = map(int, input().split())
    total += r-l+1
print(total)

Solution (Python):

import heapq
import math

num = 0
N = int(input())
for i in range(N):
    tmp = input()
    l, r = [int(a) for a in tmp.split()]
    num += (r-l) + 1

print(num)

Solution (Python):
a = int(input())
b = [map(int, input().split()) for x in range(a)]

print(sum(B - A + 1 for A, B in b))

Solution (Python):
n = int(input())
ans = 0
for tc in range(n):
  l, r = map(int, input().split())
  ans += (r - l) + 1
print(ans)

Solution (Python):
N = int(input())
cnt = 0

for _ in range(N):
    l, r = map(int, input().split())
    cnt += r-l+1

print(cnt)

Solution (Python):

def main():
    n = int(input())
    ans = 0
    for _ in range(n):
        a, b = map(int, input().strip().split())
        ans += b - a + 1
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans = 0
for _ in range(n):
    l, r = map(int, input().split())
    ans += r - l + 1
print(ans)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
gosa = 1.0 / 10**10
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    n = I()
    r = 0
    for _ in range(n):
        a,b = LI()
        r += b-a+1

    return r

print(main())

Solution (Python):
ans = 0
for i in range(int(input())):
  a, b = map(int, input().split())
  ans += b + 1 - a
print(ans)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline()

n = ni()

ans = 0
for i in range(n):
    l,r = na()
    ans += r-l+1
print(ans)

Solution (Python):
N = input()
ans = 0
for i in xrange(N):
    l, r = map(int, raw_input().split())
    ans += r - l + 1
print ans