luogu2393 yyy loves Maths II

使用long double

#include <iostream>
#include <cstdio>
using namespace std;
long double ans=0.0, xx;
int main(){
	while(scanf("%Lf", &xx)!=EOF)
		ans = ans + xx * 1000000;
	printf("%.5Lf", ans/1000000);
	return 0;
}
posted @ 2018-01-01 20:00  poorpool  阅读(102)  评论(0编辑  收藏  举报