Helping Chef Codechef Solution

Hello Programmers In this post, you will know how to solve the Helping Chef Codechef Solution.

Ezoicreport this adHelping Chef Codechef Solution
Helping Chef Codechef Solution

One more thing to add, don’t directly look for the solutions, first try to solve the problems of Codechef by yourself. If you find any difficulty after trying several times, then you can look for solutions.

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!

Helping Chef CodeChef Solutions in Python

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 BrokenProgrammers. This tutorial is only for Educational and Learning purpose.

Note:- I compile all programs, if there is any case program is not working and showing an error please let me know in the comment section. If you are using adblocker, please disable adblocker because some functions of the site may not work correctly.

Next: Chef And Operators Codechef Solution

Sharing Is Caring

Leave a Comment

Ezoicreport this ad