练习专区

今天的一小步就是明天的一大步
Problem 1302 Lucky Numbers
Accepted: 9   Total Submit: 12
Time Limit: 1000ms   Memory Limit: 30720KB
Description
PangGe loves lucky mumber. He thinks that the positive integers are lucky if their decimal representation contain the digit 8 or they can be devided by 8. One day PangGe came across a positive number n.Help him find out whether n is a lucky number.
Input
The first line contains an integer T,indicating the number of test cases. Each test case contains an integer N(1<=N<=100).
Output
For each test case in the input, print one line: "Case X: Y",where Xis the test case number (starting with 1) and Y is "Yes" or "No"represents whether n is a lucky number.
Sample Input
5
18
5
6
8
24
Sample Output
Case 1: Yes
Case 2: No
Case 3: No
Case 4: Yes
Case 5: Yes
Hint
提交     返回