PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: iceknight1093
Tester: raysh07
Editorialist: iceknight1093
DIFFICULTY:
Cakewalk
PREREQUISITES:
None
PROBLEM:
There are X small rooms and Y large rooms.
It takes 30 minutes to clean a small room and 60 minutes to clean a large room.
Find the time needed to clean all the rooms.
EXPLANATION:
Each small room needs 30 minutes, so X of them will require 30\cdot X minutes.
Each large room needs 60 minutes, so Y of them will require 60\cdot Y minutes.
Adding them up, the total is
30\cdot X + 60\cdot Y
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (PyPy3)
x, y = map(int, input().split())
print(30*x + 60*y)