CWCTH - Editorial

PROBLEM LINK:

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

Author: iceknight1093
Tester: sushil2006
Editorialist: iceknight1093

DIFFICULTY:

Cakewalk

PREREQUISITES:

None

PROBLEM:

Chef saw A clouds in the morning and B in the evening.
He believes it will rain if B is at least three times A.
Will it rain?

EXPLANATION:

It will rain if B\geq 3A and won’t rain otherwise.
So,

  • If B\ge 3A, print Rain.
  • Otherwise, print Dry.

TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

CODE:

Editorialist's code (PyPy3)
a, b = map(int, input().split())
print('Rain' if b >= 3*a else 'Dry')