标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4580 Accepted Submission(s): 2769
#include "stdio.h" int main() { int n; double sum,i; while(scanf("%d",&n)&&n) { sum=n; i=2; while(n--) sum+=(1/i++)*n*2; printf("%.2lf\n",sum); } }
标签:
原文地址:http://www.cnblogs.com/tianyong/p/4176825.html