Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Chef has recently introduced a feature which allows you to open any user’s submitted code (not just your own), and ask an AI to explain that code in English. For example, you can go to https://www.codechef.com/viewsolution/70530506 and click on “Analyse This Code”.
But there is a restriction that the feature works only on codes which are at most 1000 characters long. Given the number of characters, C, in a particular code, output whether the feature is available on this code or not.
The only line of input will contain a single integer C, denoting the number of characters in the code.
Output a single line which contains either “Yes”, if the feature is available on this code, or “No”, if not.
You may print each character of the string in either uppercase or lowercase (for example, the strings NO
, nO
, No
, and no
will all be treated as identical).
Input: 50
Output: Yes
The code’s length is only 50, and 50≤1000. So, the feature is available, and the answer is “Yes”.
Input: 1000
Output: Yes
The code’s length is 1000, and 1000≤1000. So, the feature is available, and the answer is “Yes”.
Input: 1001
Output: No
The code’s length is 1001, and 1001≰1000. So, the feature is not available, and the answer is “No”.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int x;
cin>>x;
if(x<=1000)
cout<<"Yes";
else
cout<<"No";
}
c = int(input())
if c>1000:
print("NO")
elif c<1:
print("NO")
else:
print("YES")
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 c=sc.nextInt();
if(c<=1000){
System.out.println("YES");
}else{
System.out.println("NO");
}
}
}
In our experience, we suggest you solve this AI Analysing Code 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 AI Analysing Code CodeChef Solution
I hope this AI Analysing Code 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 >>