P1235 - 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:

Registering for a contest is free for the first X users, and costs 100 rupees otherwise.
Alice registered at position Y. How much did she pay?

EXPLANATION:

If Y \le X, Alice was among the first X registrants, and so doesn’t have to pay anything.
The answer is 0 in this case.

If Y \gt X, Alice instead has to pay the full amount of 100 rupees.

TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

CODE:

Editorialist's code (PyPy3)
x, y = map(int, input().split())
if y <= x: print(0)
else: print(100)