1. 程式人生 > >HDU 2105: The Center of Gravity

HDU 2105: The Center of Gravity

using int date amp pan space bit sync double

The Center of Gravity

[email protected] Sycamore, ZJNU;
[email protected] 8/4/2017
#include<bits/stdc++.h>
using namespace std;
int main()
{
	ios::sync_with_stdio(false);
	int t;
	while (cin >> t&&t)
		while (t--)
		{
			double a, b, c, d, e, f;
			cin >> a >>
b >> c >> d >> e >> f; cout << fixed << setprecision(1) << (a + c + e) / 3 << ‘ ‘ << fixed << setprecision(1) << (b + d + f) / 3 << ‘\n‘; } return 0; }

HDU 2105: The Center of Gravity