SQUIDBANK - Editorial

PROBLEM LINK:

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

Author:
Tester: sushil2006
Editorialist: iceknight1093

DIFFICULTY:

Cakewalk

PREREQUISITES:

None

PROBLEM:

There are N participants in “Squid Game”, of which only K survive in the end.
Each eliminated participant contributes 10000 to the prize pool.
Find the final prize pool.

EXPLANATION:

K participants out of N survived, so (N-K) were eliminated.
This means the final prize pool is

10000 \cdot (N - K)

TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

CODE:

Editorialist's code (PyPy3)
n, k = map(int, input().split())
print((n - k) * 10000)