304 North Cardinal St.
Dorchester Center, MA 02124

# Chef and SnackDown CodeChef Solution

## Problem – Chef and SnackDown CodeChef Solution

###Read problems statements in RussianVietnameseHindiMandarin chinese and Bengali as well.

Chef is interested in the history of SnackDown contests. He needs a program to verify if SnackDown was hosted in a given year.

SnackDown was hosted by CodeChef in the following years: 2010, 2015, 2016, 2017 and 2019.

### Input Format

The first line contain the number of test-cases T.

The first line of each test-case contains a single integer N.

### Output Format

For each test case print a single line containing the string `"HOSTED"` if SnackDown was hosted in year NN or `"NOT HOSTED"` otherwise (without quotes).

• 1≤T≤10
• 2010≤N≤2019

### Sample 1:

``````Input:
2
2019
2018
Output:
HOSTED
NOT HOSTED``````

## Chef and SnackDown CodeChef Solution in Pyth 3

``````# cook your dish here
t=int(input())
for i in range(t):
n=input()
a=['2010','2015','2016','2017','2019']
if n in a:
print('HOSTED')
else:
print('NOT HOSTED')``````

## Chef and SnackDown CodeChef Solution in C++17

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

{
int n ;
cin>>n ;
for(int i=1 ;i<=n ;i++){
int s ;
cin>>s ;
if(s==2010 || s==2015 || s==2016 || s==2017 || s==2019)cout<<"HOSTED"<<endl ;
else cout<<"NOT HOSTED"<<endl ;

}
return 0 ;
}
``````

## Chef and SnackDown 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 n = sc.nextInt();
if(2010==n||2015==n||2016==n||2017==n||2019==n)
System.out.println("HOSTED");
else
System.out.println("NOT HOSTED");
}
}
}
``````
##### Chef and SnackDown CodeChef Solution Review:

In our experience, we suggest you solve this Chef and SnackDown 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 Chef and SnackDown CodeChef Solution

Find on CodeChef

##### Conclusion:

I hope this Chef and SnackDown 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