Drill

ProblemsC# › events

What does this meeting cost

mediumeventsMathC#

Finance wants every meeting priced: length × attendees × hourly rate, rounded down.

MeetingCost(minutes: int, attendees: int, ratePerHour: int) → int

C# needs a compiler and Drill does not host one yet, so this page is the reference rather than an exercise: the problem, worked examples, and the solution in full. To type it out, the same problem runs in Python.

Solve it in Python →

Where you start

public int MeetingCost(int minutes, int attendees, int ratePerHour) {
    
}

Worked examples

CallResult
MeetingCost(30, 5, 100)250
MeetingCost(60, 3, 80)240
MeetingCost(45, 4, 60)180
MeetingCost(0, 5, 100)0

Hint

Multiply first, then integer-divide by 60.

Reference solution in C#
public int MeetingCost(int minutes, int attendees, int ratePerHour) {
    return (minutes * attendees * ratePerHour) / 60;
}

The same problem in another language

More events problems in C#