AI Analysing Code CodeChef Solution

Problem – AI Analysing Code CodeChef Solution

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 10001000 characters long. Given the number of characters, CC, in a particular code, output whether the feature is available on this code or not.

Input Format

The only line of input will contain a single integer CC, denoting the number of characters in the code.

Output Format

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 NOnONo, and no will all be treated as identical).

Constraints

  • 1 \leq C \leq 100001≤C≤10000

Sample 1:

Input: 50
Output: Yes

Explanation:

The code’s length is only 5050, and 50 \le 100050≤1000. So, the feature is available, and the answer is “Yes”.

Sample 2:

Input: 1000
Output: Yes

Explanation:

The code’s length is 10001000, and 1000 \le 10001000≤1000. So, the feature is available, and the answer is “Yes”.

Sample 3:

Input: 1001
Output: No

Explanation:

The code’s length is 10011001, and 1001 \nleq 10001001≰1000. So, the feature is not available, and the answer is “No”.

AI Analysing Code CodeChef Solution in C++14

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	int c;
	cin>>c;
	if(c > 1000){
	    cout<<"NO";
	}
	else{
	    cout<<"YES";
	}
	return 0;
}

AI Analysing Code CodeChef Solution in Python3

# cook your dish here
C=int(input());
if(C<=1000):
    print('Yes')
else:
    print('No')

AI Analysing Code CodeChef Solution in Java

/* 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
	{
		// your code goes here
    Scanner sc=new Scanner(System.in);
    int T=sc.nextInt();
    if(T<=1000){
        System.out.println("YES");
    }
    else{
        System.out.println("NO");
    }
	}
}
AI Analysing Code CodeChef Solution Review:

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

Find on CodeChef

Conclusion:

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

LeetCode Solutions

Hacker Rank Solutions

CodeChef Solutions

Leave a Reply

Your email address will not be published.