码迷,mamicode.com
首页 > 其他好文 > 详细

收集邮票

时间:2019-02-02 11:21:29      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:als   iostream   收集   lse   int   const   std   str   clu   

#include<cstdio>
#include<iostream>
typedef long double ld;
const int maxn = 10010;
int n;
int main(){
std::ios::sync_with_stdio(false),std::cin.tie(0);
std::cin >> n;
ld f=0,g=0;
for(int i=1;i<=n;++i){
g += (ld)n/i;
f += g * n / i;
}
printf("%.2Lf",f);
}

收集邮票

标签:als   iostream   收集   lse   int   const   std   str   clu   

原文地址:https://www.cnblogs.com/skip1978/p/10347788.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!