4051
m = 0
sum = 0
for i in range(1,6):
x,y = input().split()
x = float(x)
y = float(y)
if y - x - 1 >= 4: #4시간까지 인정
m = m + 4
elif 0 <= y - x - 1 : #4시간 미만 인정
m = m + y - x - 1
if m >= 15:
sum = (m-5/100*m)*10000
elif m <= 5:
sum = (m+5/100*m)*10000
else:
sum = m * 10000
sum = int(sum)
print(sum)
4771
sum = 0
str = input()
for i in range(len(str)):
if i == 0 :
sum = 10
elif str[i] == str[i-1]:
sum = sum + 5
else:
sum = sum + 10
print(sum)
4711
sum = 0
f = 0
for i in range(4):
x,y = input().split()
x = int(x)
y = int(y)
sum = sum-x+y
if f<sum:
f = sum
print(f)
4592
x = input()
x = int(x)
sum = 0
data = [[0] * 100 for _ in range(100)]
for i in range(x):
y,z = input().split()
y = int(y)
z = int(z)
for j in range(y,y+10):
for f in range(z,z+10):
data[j][f] = 1
for d in range(100):
for s in range(100):
if data[d][s] == 1:
sum = sum + 1
print(sum)