11044

大水题,没什么说的

//============================================================================
// Name        : 11044.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
using namespace std;

long long t;
int N, a, b;

int main() {
	freopen("a.txt", "r", stdin);
	scanf("%d", &N);
	while(N--){
		scanf("%d%d", &a, &b);
		t = (ceil((a-2)*1.0/3))*(ceil((b-2)*1.0/3));
		printf("%lld\n", t);
	}
	return 0;
}

posted @ 2011-06-17 22:58  KOKO's  阅读(243)  评论(0编辑  收藏  举报