PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: raysh07
Tester: sushil2006
Editorialist: iceknight1093
DIFFICULTY:
Cakewalk
PREREQUISITES:
None
PROBLEM:
You and N of your friends want to attend a concert.
Each ticket costs 5000, how much will you pay in total?
EXPLANATION:
Since you’re going with N friends, that’s N+1 people in total.
At a cost of 5000 per ticket, the total cost comes out to be
5000\times (N+1)
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (PyPy3)
n = int(input())
print((n+1) * 5000)