Problem 2146 Easy Game (Fzu math AH)

Source: Internet
Author: User

Title Link: http://acm.fzu.edu.cn/problem.php?pid=2146


Problem Description

Fat brother and Maze is playing a kind of special (hentai) game on a string S. Now they would as to count the length of this string. But as both Fat brother and Maze is programmers, they can recognize only the numbers 0 and 1. So instead of judging the length of this string, they decide to judge weather this number is even.

Input

The first line of the date is a integer T, which is the number of the text cases.

Then T cases follow contains a line describe the string S in the treasure map. Not this S only contains lower case letters.

1 <= T <=, the length of the string is less than 10086

Output

For each case, output the case number first, and then output "ODD" if the length of S is ODD, otherwise just output "even" .

Sample Input4wellthisisthesimplestprobleminthiscontest Sample Outputcase 1:evencase 2:oddcase 3:oddcase 4:odd

The code is as follows:

#include <cstdio> #include <cstring>int main () {    char s[10087];    int cas = 0;    int t;    scanf ("%d", &t);    while (t--)    {        scanf ("%s", s);        int Len=strlen (s);        printf ("Case%d:", ++cas);        if (len%2)            printf ("odd\n");        else            printf ("even\n");    }    return 0;}


Problem 2146 Easy Game (Fzu math AH)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.