Helping Chef - CodeChef Solution

Hello coders, today we are going to solve Helping Hands CodeChef Solution whose Problem code is FLOW008. Write a program, which takes an integer N and

Hello coders, today we are going to solve Helping Hands CodeChef Solution whose Problem code is FLOW008.

Helping Chef - CodeChef Solution

Problem

Write a program, which takes an integer N and if the number is less than 10 then display "Thanks for helping Chef!" otherwise print "-1".

Input

The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer N.

Output

For each test case, output the given string or -1 depending on conditions, in a new line.

Constraints

  • 1 <= T <= 1000
  • -20 <= N <= 20

Example

Input:

3 
1
12
-5

Output:

Thanks for helping Chef!
-1
Thanks for helping Chef!

Solution - Helping Chef - CodeChef Solution

Python 3 

#Solution Provided by Sloth Coders 
T = int(input())
while T > 0:
    n = int(input())
    if n < 10:
        print("Thanks for helping Chef!")
    else:
        print(-1)
    T = T - 1        

Disclaimer: The above Problem (Helping Chef) is generated by CodeChef but the Solution is provided by Sloth Coders.

Happy Coding !!

A Sloth Who loves to Code 

Also Read:

Sloth Coders is a Learning Platform for Coders, Programmers and Developers to learn from the basics to advance of Coding of different langauges(python, Java, Javascript and many more).

Post a Comment