Files
python/LuoGu/RuMen/P2393.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

19 lines
716 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include<bits/stdc++.h>
using namespace std;
//注意精度
long double S, T;
int main() {
/**
假设该程序编译得到的可执行程序是 mycin.exe。在 Windows 系统中,通过键盘输入时,
在单独的一行按 Ctrl+Z 键后再按回车键,就代表输入结束。因此程序运行时,输入若干个正整数后换行,
再按 Ctrl+Z 键和回车键程序就会输出最大值并结束。即cin>>n这个表达式在碰到 Ctrl +Z 时,会返回 false。
在 UNIX/Linux 系统中Ctrl+D 代表输入结束。
*/
while ((cin >> T) != 0) {
S += T * 1000000;
}
cout << fixed << setprecision(5) << S / 1000000;;
return 0;
}