zoj1037 gridland 解答

os posted @ 2013年9月09日 11:40 in ACM , 2871 阅读

acm 题目List

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1037

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
1. M*N; M*N-1+sqrt(2);
2. scanf/printf
3. Judge if the number is even number (number%2 == 0)
*/
 
 
#include <stdio.h>
 
int main()
{
    int iCase;
    scanf("%d", &iCase);
 
    int i;
    for (i = 1; i <= iCase; i++)
    {
        int N, M;
        scanf("%d%d", &N, &M);
        printf("Scenario #%d:\n", i);
        printf("%d.", M*N);
 
        if(M&0x1 && N&0x1)         
            printf("41");
        else
            printf("00");
        printf("\n\n");
 
    }
    return 0;
}

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter