Cod sursa(job #22771)

Utilizator amadaeusLucian Boca amadaeus Data 27 februarie 2007 14:17:15
Problema Adapost 2 Scor 10
Compilator c Status done
Runda Arhiva de probleme Marime 0.36 kb
#include <stdio.h>

int main() {
	int i, N;
	long double cx, cy, x, y;
	
	freopen( "adapost2.in", "r", stdin );
	freopen( "adapost2.out", "w", stdout );

	scanf( "%d", &N );
	x = y = cx = cy = 0;
	
	for( i=1; i<=N; i++ ) {
		scanf( "%llf%llf", &x, &y );
		cx += x; cy += y;
	}
	cx /= N;
	cy /= N;

	printf( "%.4llf %.4llf\n", cx, cy );
	return 0;
}