304 North Cardinal St.
Dorchester Center, MA 02124

# Increase IQ CodeChef Solution

## Problem – Increase IQ CodeChef Solution

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).

### Input Format

• The first and only line of input will contain a single integer X, the current IQ of Chef.

### Output Format

• For each testcase, output in a single line “Yes” or “No”
• 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).

### Constraints

• 100≤X≤169

Subtask #1 (100 points): Original constraints

### Sample 1:

``````Input: 165
Output: Yes``````

### Explanation:

After learning a musical instrument, Chef’s final IQ will be 165+7=172. Since 172>170, Chef can beat Einstein.

### Sample 2:

``````Input: 120
Output: No``````

### Explanation:

After learning a musical instrument, Chef’s final IQ will be 120+7=127. Since 127<170, Chef cannot beat Einstein.

### Increase IQ CodeChef Solution in Pyth 3

``````n=int(input())
if (n+7)>170:
print("Yes")
else:
print("No")``````

### Increase IQ CodeChef Solution in C++17

``````#include<bits/stdc++.h>
using namespace std;
#define int long long int
int32_t main()
{

int x;
cin>>x;
x+=7;
if(x>170)
cout<<"Yes\n";
else
cout<<"No\n";

}``````

### Increase IQ CodeChef Solution in Java

``````import java.util.*;
import java.lang.*;
import java.io.*;

class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
if((x + 7) > 170){
System.out.println("YES");
}
else{
System.out.println("NO");
}
}
}
``````
##### Increase IQ CodeChef Solution Review:

In our experience, we suggest you solve this Increase IQ CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.

If you are stuck anywhere between any coding problem, just visit Queslers to get the Increase IQ CodeChef Solution

Find on CodeChef

##### Conclusion:

I hope this Increase IQ CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.

This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.

Keep Learning!

More Coding Solutions >>

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions