Pro.ID22458 TitleProbability One Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22458 AC26 Submit39 Ratio66.67% 时间&空间限制描述Number guessing is a popular game between elementary-school kids. Teachers encourage pupils to play the game as it enhances their arithmetic skills, logical thinking, and following-up simple procedures. We think that, most probably, you too will master in few minutes. Here’s one example of how you too can play this game: Ask a friend to think of a number, let’s call it n0. Then:
Here’s an example that you can follow: If n0 = 37, then n1 = 111 which is odd. Now we can calculate n2 = 56, n3 = 168, and n4 = 18, which is what your friend will tell you. Doing the calculation 2 × n4 + 1 = 37 reveals n0. 输入Your program will be tested on one or more test cases. Each test case is made of a single positive number (0 < n0 < 1, 000, 000). 输出Description Number guessing is a popular game between elementary-school kids. Teachers encourage pupils to play the game as it enhances their arithmetic skills, logical thinking, and following-up simple procedures. We think that, most probably, you too will master in few minutes. Here’s one example of how you too can play this game: Ask a friend to think of a number, let’s call it n0. Then:
Here’s an example that you can follow: If n0 = 37, then n1 = 111 which is odd. Now we can calculate n2 = 56, n3 = 168, and n4 = 18, which is what your friend will tell you. Doing the calculation 2 × n4 + 1 = 37 reveals n0. Input Your program will be tested on one or more test cases. Each test case is made of a single positive number (0 < n0 < 1, 000, 000). Output For each test case, print the following line: k. B Q Where k is the test case number (starting at one,) B is either 'even' or 'odd' (without the quotes) depending on your friend’s answer in step 1. Q is your friend’s answer to step 4. Sample Input 37 Sample Output 1. odd 18 Hint 请忽略本题。 Source 样例输入37 样例输出1. odd 18 提示请忽略本题。 |