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 |
这样为什么WA掉了?哪位高手清帮忙看下。。。谢谢!#include <iostream> using namespace std; int main () { double n,m; while (scanf("%lf%lf",&n,&m)!=EOF) { if(n==0&&m==0) break; double x,y,ans=1.0; x=n<m? n:m; y=n>m? n:m; int i=0; for (i=y+x;i>=y+1;i--) { ans=ans*i; } double s=1.0; int j=0; for (j=x;j>=1.0;j--) { s=s*j; } printf("%.0lf\n",ans/s); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator