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;
}

浙公网安备 33010602011771号