Saturday, May 16, 2015

UVa 12502 - Three Families

// UVa 12502 - Three Families

#include <stdio.h>

int main() {
	int t;
	for (scanf("%d", &t); t; t--) {
		int x, y, z;
		scanf("%d%d%d", &x, &y, &z);
		int z1 = z * (2 * x - y) / (x + y);
		printf("%d\n", z1);
	}
	return 0;
}

No comments:

Post a Comment