Hello coders, today we are going to solve Helping Chef Codechef Solution. Which is a part of Codechef Solution.
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”.
The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer N.
For each test case, output the given string or -1 depending on conditions, in a new line.
- 1 <= T <= 1000
- -20 <= N <= 20
3 1 12 -5
Thanks for helping Chef! -1 Thanks for helping Chef!
Helping Chef CodeChef Solution 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