Wesley's Anger Contest 3 Problem 1 - Snow Day Predictor

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 256M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Being fed up with online snow day predictors and their inaccurate results, you have decided to take matters into your own hands and write your own snow day predictor.

You are given the temperature T (in Celsius), the total amount of snowfall D (in centimetres), and the probability of freezing rain P (as a percentage).

A snow day will only occur if at least two of the following conditions are satisfied:

  • The temperature is strictly colder than -40 degrees Celsius.
  • There is 15cm of snow or more on the ground.
  • The risk of freezing rain is strictly more than 50%.

Please determine whether the given weather information will cause a snow day. If there is a snow day, output YES. Otherwise, output NO.


For this problem, you will be required to pass all the samples in order to receive any points.

-100 \le T \le 100
0 \le D \le 100
0 \le P \le 100

Input Specification

The first and only line will contain 3 integers T, D, and P, representing the temperature, the snowfall, and the risk of freezing rain.

Output Specification

Output one line only. If there is a snow day, output YES. Otherwise, output NO.

Sample Input 1

-41 5 51

Sample Output 1


Sample Input 2

-8 16 10

Sample Output 2



There are no comments at the moment.