Windows != Linux
查看原帖
Windows != Linux
1279373
starwind24楼主2024/8/23 20:58

所以我的代码在Windows电脑上一直输入而在Linux上没啥错是吗?

代码:

#include<bits/stdc++.h>
using namespace std;
const int n=1e6;
int main(){
	long double ans=0,x;
	while((scanf("%Lf",&x))!=EOF){
		ans+=x*n;
	}
	printf("%.5Lf",ans/n);
	return 0;
}

2024/8/23 20:58
加载中...