RIP2000 - Editorial

PROBLEM LINK:

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

Author: yash_daga
Tester: jay_1048576
Editorialist: iceknight1093

DIFFICULTY:

284

PREREQUISITES:

None

PROBLEM:

Find the number of \text{Rs. } 500 bills needed to pay an equivalent amount to N \text{ Rs. } 2000 bills.

EXPLANATION:

We know 2000 = 500 \times 4.
So, 4 bills of \text{Rs. } 500 are needed to cover for one \text{Rs. } 2000 bill.

Thus, N bills of \text{Rs. 2000} will require 4N bills of \text{Rs. 500}.

TIME COMPLEXITY

\mathcal{O}(1) per testcase.

CODE:

Editorialist's code (Python)
for _ in range(int(input())):
    n = int(input())
    print(4*n)