UVA 10790 (暑假-数学(3)-A - How Many Points of Intersection?)

#include <cstdio>

int main() {
	long long a, b, count = 0;
	while (scanf("%lld%lld", &a, &b) && (a || b)) {
		printf("Case %lld: %lld\n", ++count, a*(a-1) * b*(b-1) / 4);
	}
	return 0;
}

你可能感兴趣的:(UVA 10790 (暑假-数学(3)-A - How Many Points of Intersection?))