← 返回 doordash 的题目列表Calculate Dasher Pay
类型:online_judge
In the DoorDash system, a Dasher's (delivery driver's) pay is calculated based on a base rate, a distance fee, a time fee, and tip. Write a function to calculate and return the total pay given specific conditions. Required inputs are the base rate (integer), distance rate (integer), distance in kilometers (integer), time rate (integer), delivery time in minutes (integer), and tip (integer).
Requirements:
Input consists of six integers: base rate, distance rate, distance, time rate, delivery time, and tip.
Output an integer representing the total pay.
Example:
Input:
Base Rate: 5
Distance Rate: 2
Distance: 10
Time Rate: 1
Time: 30
Tip: 5
Output:
40
Example
Input
5 2 10 1 30 5