Aniket in dillema
All submissions for this problem are available.
Aniket has just won a contest and will recieve a prize worth w rupees. He wishes to buy three items he loves having cost x , y and z . If he can buy the three items he becomes Happy else he is Sad. Given w, x, y and z. Can you tell if he is Happy or Sad. Okay.
First line contains 4 integers denoting w,x,y and z respectively.
Print "Happy" if Aniket can buy the three items else print "Sad".
- 0 ≤ w,x,y,z ≤ 108
Input 1: 10 2 3 4 Output 1: Happy
Input 2: 10 3 4 5 Output 2: Sad
|Tags||cakewalk, npl_nitw, nplelg, nplq1601|
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions