PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author, Tester, and Editorialist: iceknight1093
DIFFICULTY:
TBD
PREREQUISITES:
None
PROBLEM:
Given X and Y, the runtimes of a submission on Codechef’s old and new judging systems, report which one is faster.
EXPLANATION:
As per the statement, the answer is:
Old
, if X \lt YNew
, if X \gt YSame
, if X = Y
Check which of these three conditions is true, using if
statements; then print the appropriate output.
TIME COMPLEXITY
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (Python)
x, y = map(int, input().split())
print('New' if x > y else ('Old' if x < y else 'Same'))