2987: 图书馆借阅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:4 Solved:3

Description

题目描述图书馆规定:图书借阅时长超过 free 分钟(含 free)的部分,每分钟收取 cost 元滞纳金。但如果借阅总时长在 ex1 分钟到 ex2 分钟之间(含 ex1、ex2),可免除所有滞纳金。已知借阅总时长为 t 分钟,请编程计算需要缴纳的滞纳金金额(结果保留 1 位小数)。

Input

读入 4 个整数:free cost ex1 ex2 t(空格隔开)。

Output

输出应缴纳的滞纳金(若无需缴纳,输出 0.0)。

Sample Input Copy

30 2 60 90 75

Sample Output Copy

0.0

HINT

样例解释75 分钟在 60-90 分钟豁免区间内,无需缴纳滞纳金。