1 #include <iostream> 2 #define _for(i,a,b) for(int i = (a);i < b;i ++) 3 #define _rep(i,a,b) for(int i = (a);i > b;i --) 4 #define INF 0x3f3f3f3f 5 #define MOD 1000000007 6 #define maxn 50003 7 typedef long long ll; 8 9 using namespace std; 10 typedef pair<int,int> P;//first 是最短距离,second 是顶点编号 11 inline ll read() 12 { 13 ll ans = 0; 14 char ch = getchar(), last = ‘ ‘; 15 while(!isdigit(ch)) last = ch, ch = getchar(); 16 while(isdigit(ch)) ans = (ans << 1) + (ans << 3) + ch - ‘0‘, ch = getchar(); 17 if(last == ‘-‘) ans = -ans; 18 return ans; 19 } 20 inline void write(ll x) 21 { 22 if(x < 0) x = -x, putchar(‘-‘); 23 if(x >= 10) write(x / 10); 24 putchar(x % 10 + ‘0‘); 25 } 26 long double rnt = 0.0; 27 long double a; 28 int main() 29 { 30 // freopen("testdata (2).in","r+",stdin); 31 while(~scanf("%Lf",&a)) 32 rnt += a*1000000; 33 printf("%.5Lf",rnt/1000000); 34 return 0; 35 }
原文地址:https://www.cnblogs.com/Asurudo/p/11619125.html
时间: 2024-10-14 08:24:46