zoj1037 gridland 解答

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

acm 题目List

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

/*
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