PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: iceknight1093
Tester: tabr
Editorialist: iceknight1093
DIFFICULTY:
Cakewalk
PREREQUISITES:
None
PROBLEM:
You have X nuggets which sell for 5000 each, and Y star pieces that sell for 9800 each. How much money will you make by selling them all?
EXPLANATION:
Each nugget is 5000, so you obtain 5000\cdot X for selling X of them.
Each star piece is 9800, so you obtain 9800\cdot Y for selling Y of them.
Thus, the answer is
5000\cdot X + 9800\cdot X
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (PyPy3)
x, y = map(int, input().split())
print(5000*x + 9800*y)