P1BAR - Editorial

PROBLEM LINK:

Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4

Author: pols_agyi_pols
Tester: kingmessi
Editorialist: iceknight1093

DIFFICULTY:

Cakewalk

PREREQUISITES:

None

PROBLEM:

A basketball team scored X three-pointers and Y two-pointers.
How many points did they earn?

EXPLANATION:

X three-pointers is a total of 3X points, while Y two-pointers is a total of 2Y points.
Thus, the overall total is

3X + 2Y

TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

CODE:

Editorialist's code (PyPy3)
x, y = map(int, input().split())
print(3*x + 2*y)