#B2609. Classroom Cleaning Problem
Classroom Cleaning Problem
Classroom Cleaning Problem
Three students can clean three classrooms in three hours. Assuming that the work done is directly proportional to the number of students and the working hours, you are to determine the number of classrooms that can be cleaned in a different scenario.
More formally, if S students can clean R classrooms in T hours, then X students working for Y hours can clean a number of classrooms equal to
\( \frac{X \times Y \times R}{S \times T} \)
For example, if S = 3, T = 3, R = 3 and you are given X = 9, Y = 9, the answer would be 27.
inputFormat
The input consists of two lines:
- The first line contains three space-separated positive integers: S, T, and R, where S is the number of students, T is the number of hours, and R is the number of classrooms cleaned.
- The second line contains two space-separated positive integers: X and Y, where X is the number of students and Y is the number of hours for the query scenario.
You can assume that the result of the computation is an integer.
outputFormat
Output a single integer representing the number of classrooms cleaned in the query scenario.
sample
3 3 3
9 9
27