304 North Cardinal St.
Dorchester Center, MA 02124

# Problem Category CodeChef Solution

## Problem Category CodeChef Solution in C++17

``````#include <iostream>
using namespace std;

int main() {
int t,x;
cin>>t;
while(t--){
cin>>x;
if(x>=1&&x<100){
cout<<"Easy\n";
}
else if(x>=100&&x<200){
cout<<"Medium\n";
}
else if(x>=200&&x<=300){
cout<<"Hard\n";
}
}
return 0;
}
``````

## Problem Category CodeChef Solution in C++14

``````#include <iostream>
using namespace std;

int main() {
int t,x;
cin>>t;
while(t--){
cin>>x;
if(x>=1&&x<100){
cout<<"Easy\n";
}
else if(x>=100&&x<200){
cout<<"Medium\n";
}
else if(x>=200&&x<=300){
cout<<"Hard\n";
}
}
return 0;
}
``````

## Problem Category CodeChef Solution in PYTH 3

``````# cook your dish here
for i in range(int(input())):
x = int(input())
if x in range(1,100):
print("Easy")
elif x in range(100,200):
print("Medium")
elif x in range(200,301):
print("Hard")``````

## Problem Category CodeChef Solution in C

``````#include <stdio.h>

int main(void) {
int x;
scanf("%d",&x);
for(int i=1;i<=x;i++){
int a;
scanf("%d",&a);
if(a>=1 && a<100){
printf("Easy\n");
}
else if(a>=100 && a<200){
printf("Medium\n");
}
else{
printf("Hard\n");
}
}
return 0;
}

``````

## Problem Category 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
{
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
while(t-->0){
int x = sc.nextInt();
if(x<100){
System.out.println("Easy");
}
else if(x>=100 && x<200){
System.out.println("Medium");
}
else{
System.out.println("Hard");
}
}
}
}
``````

## Problem Category CodeChef Solution in PYPY 3

``````for _ in range(int(input())):
x=int(input())
if 1<=x<100:
print("Easy")
elif 100<=x<200:
print("Medium")
else:
print("Hard")``````

## Problem Category CodeChef Solution in PYTH

``````# cook your code here
t=int(input())
for i in range(t):
x=int(input())
if x>=1 and x<100:
print("EASY")
elif x<200 and x>=100:
print("MEDIUM")
else:
print("HARD")``````

## Problem Category CodeChef Solution in C#

``````using System;

public class Test
{
public static void Main()
{
string[] s;
for(int i=0;i<t;i++)
{
int x=int.Parse(s[0]);
if(x<100)
{
Console.WriteLine("Easy");
}
else if(x<200)
{
Console.WriteLine("Medium");
}
else
{
Console.WriteLine("Hard");
}
}
}
}
``````

## Problem Category CodeChef Solution in NODEJS

``````process.stdin.resume();
process.stdin.setEncoding('utf8');

let input = ''

function checkInput(data) {
input += data
}

function prepareInput() {
input = input.split('\n')
}

function main() {
prepareInput()

let N = input.splice(0, 1)

for(let i=0; i<N; i++){
let num = Number(input[i])

let ans = num >= 1 && num < 100 ? 'Easy'
: num >= 100 && num <200 ? 'Medium'
: 'Hard'

process.stdout.write(ans + '\n')
}

process.exit()

}

process.stdin.on('data', checkInput).on('end', main)``````

## Problem Category CodeChef Solution in GO

``````package main
import (
"fmt"
"bufio"
"os"
)

scanner := bufio.NewScanner(os.Stdin)

for scanner.Scan() {
line := scanner.Text()
number := 0
sign := 1
beg := false
for i := 0; i < len(line); i++ {
if '0' <= line[i] && line[i] <= '9' {
beg = true
number = number * 10 + int(line[i] - '0')
} else if line[i] == '-' {
sign = -1
} else {
if beg == true {
c <- sign * number
}
number = 0
sign = 1
beg = false
}
}
if beg == true {
c <- sign * number
}
}
}

func main(){
w := bufio.NewWriter(os.Stdout)
defer w.Flush()

inp := make(chan int, 4096)

t := <-inp
ratings := []string {"Easy", "Medium", "Hard"}
for i := 0; i < t; i++ {
x := <-inp
if x == 300 {
x -= 1
}
fmt.Fprintln(w, ratings[x / 100])
}
}
``````
##### Problem Category CodeChef Solution Review:

In our experience, we suggest you solve this Problem Category 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 Problem Category CodeChef Solution.

Find on CodeChef

##### Conclusion:

I hope this Problem Category 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 Programming Language in a business context; there are no prerequisites.

Keep Learning!