-->
当前位置:首页 > 题库

PROGRAMMING:Lucky lottery

Luz5年前 (2021-05-10)题库624
The number of a lottery ticket has six digits. If the sum of the first three digits of a lottery ticket is equal to the sum of the last three digits, the lottery ticket is said to be lucky. Please judge whether the given lottery is lucky or not.
###Input format:
Enter a positive integer n ($$$Le $$100) in the first line. Then n lines, each line gives a six digit number of the lottery.
###Output format:
For each lottery, if it is lucky, output "you are lucky!" in one line; Otherwise, 'wish you good luck.'.
###Input example:
```in
two
two hundred and thirty-three thousand and eight
one hundred and twenty-three thousand four hundred and fifty-six
```
###Output example:
```out
You are lucky!
Wish you good luck.
```







answer:If there is no answer, please comment