FIZZBUZZ2301 - Editorial

PROBLEM LINK:

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

Authors: naisheel, jalp1428
Tester: tabr
Editorialist: iceknight1093

DIFFICULTY:

273

PREREQUISITES:

None

PROBLEM:

Given the votes received by Dhoni, Rohit, and Kohli in a fan poll (A, B, C respectively), find out whether Dhoni won it.

EXPLANATION:

Dhoni wins if and only if he received more votes than the other two.
This translates to A\gt B and A\gt C.

Check both conditions using if statements; then print Yes or No appropriately.

TIME COMPLEXITY

\mathcal{O}(1) per testcase.

CODE:

Editorialist's code (Python)
a, b, c = map(int, input().split())
print('Yes' if a > b and a > c else 'No')