Python practice --L1-060 psychological shadow area (5 points)
This is a psychological shadow area chart. We all thought that he could move uniformly (blue straight line graph), and late Procrastination is the last moment of madness rush (red line chart) we tend to perform. Red, blue line around the area, is our psychological shadow area when homework.
Coordinates (x, y) now gives red knee, requiring you to figure this psychological shadow area.
Input formats:
Input 2 is given not more than 100 positive integers x and y in a row, and ensure x> y. It is assumed that the horizontal and vertical coordinates of the maximum value (i.e., completion deadline and final) are 100.
Output formats:
Output psychological shadow area in a row.
Friendly reminder: = area of the triangle base length x height / 2; rectangular base area = length x height. Bao too complicated, which is a 5 minute test subtraction problem ......
Sample input:
90 10
Sample output:
4000
n = input().split()
a = int(n[0])*int(n[1])/2+(100-int(n[0]))*(int(n[1])+100)/2
print(int(5000-a))