# a = int(input())# if a%10 == 1 and a != 11 :# print(a, 'st', sep='')# elif a%10 == 2 and a != 12 :# print(a, 'nd', sep='')# elif a%10 == 3 and a != 13 :# print(a, 'rd', sep='')# else :# print(a, 'th', sep='')# a,b = map(int, input().split())# if b == 2:# if a%400 == 0 or (a%4 == 0 and a%100 != 0):# print('29')# else :# print('28')# elif b == 4 or b == 6 or b ==9 or b ==11 :# print('30')# else :# print('31')# a,b,c = map(int, input().split())# if a + b > c :# if a == b or b == c or a == c :# if a == b == c :# print('정삼각형')# else :# print('이등변삼각형')# elif a**2 + b**2 == c**2 :# print('직각삼각형')# else :# print('삼각형')# elif a + b <= c :# print('삼각형아님')# h,w = map(float, input().split())# if h < 150 :# b = h - 100# elif h < 160 :# b = (h - 150) / 2 + 50# else :# b = (h - 100) 0.9## a = (w - b) 100 / b# if a <= 10 :# print('정상')# elif a <= 20 :# print('과체중')# else :# print('비만')# a,b,c = map(int, input().split())# if a <= 170 :# print('CRASH', a)# elif b <= 170 :# print('CRASH', b)# elif c <= 170 :# print('CRASH', c)# else :# print('PASS')# a = int(input())# if 50 <= a <= 70 or a%6 == 0 :# print('win')# else :# print('lose')# a,b = map(int, input().split())# c = a//10000# if b == 1 or b == 2 :# print(2012 - (1900 + c) + 1)# elif b == 3 or b == 4 :# print(2012 - (2000 + c) + 1)'''반복문forwhilerange(5) : 0 이상 (5) 미만 1 간격의 수 ( 0,1,2,3,4 )range(10,15) : (10)이상 (15)미만 1 간격의 수 (10,11,12,13,14)range(10,15,2) : (10)이상 (15)미만 (2) 간격의 수 (10,12,14)range(10,0,-1) : (10)이하 ( 0)초과 (-1) 간격의 수'''# while 조건식 :# 반복할 명령# 0이상 5미만 1간격# i=0# while i<5 :# print(i)# i=i+1# 0이상 5미만 1간격# for i in range(5) :# print(i)# for i in range(10,0,-1) :# if i%2==0 :# print(i, end=' ')# print()# for i in range(1,101) :# print(i, end=' ')# n = int(input())# for n in range(1,n+1) :# print(n, end=' ')# a,b = map(int, input().split())# if a >= b :# for i in range(b,a+1) :# print(i, end=' ')# elif a < b :# for i in range(a,b+1) :# print(i, end=' ')# a,b = map(int, input().split())# if a%2 == 1 :# for i in range(a,b+1,2) :# print(i, end=' ')# else :# for i in range(a+1,b+1,2) :# print(i, end=' ')# n = int(input())# for n in range(1,n+1) :# a = (n+1)*n/2# print(int(a))# a = int(input())# for i in range(1,10) :# print(a, '*', i, '=', a*i, sep='')# cnt = 0# n = int(input())# for i in range(1,n+1) :# if i%10 == 1 :# cnt=cnt+1# print(cnt)# N = int(input())# for i in range(1,N+1) :# if N%i == 0 :# print(i, end=' ')c = 0a,b = map(int, input().split())for i in range(a,b+1) : if i%2 == 0 : c = c+i elif i%2 == 1 : c= c-i
top of page
bottom of page