-
Notifications
You must be signed in to change notification settings - Fork 0
/
Increase IQ
32 lines (29 loc) · 1.1 KB
/
Increase IQ
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Increase IQ
Problem
A study has shown that playing a musical instrument helps in increasing one's IQ by 7 points.
Chef knows he can't beat Einstein in physics, but he wants to try to beat him in an IQ competition.
You know that Einstein had an IQ of 170, and Chef currently has an IQ of X.
Determine if, after learning to play a musical instrument,
Chef's IQ will become strictly greater than Einstein's.
Print "Yes" if it is possible for Chef to beat Einstein, else print "No" (without quotes).
You may print each character of the string in either uppercase or lowercase
(for example, the strings yEs, yes, Yes, and YES will all be treated as identical).
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
int x=sc.nextInt();
int y=x+7;
if(y>170){
System.out.println("YES");
}else{
System.out.println("NO");
}// your code goes here
}
}