Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
友情推荐#include"stdio.h" int main() { int n,i; double ans; printf("Cards Overhang\n"); while(scanf("%d",&n)!=EOF) { ans=0.0; for(i=1;i<=n;i++) ans=ans+1.0/(2*i); printf("%5d %.3lf\n",n,ans); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator