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 |
我刚学C,这个程序为什么会WRONG ANSWER??求助!!#include<stdio.h> int main() { int n,m,i,a,works; while(1) { works=1; scanf("%d%d",&n,&m); if(n==0&&m==0) break; if(n>=m) { a=n; n=m; m=a; } for(i=0;i<n;i=i+1) { works=(works*(n+m-i))/(i+1); } printf("%d\n",works); } return 0; } 自己运行答案没问题啊 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator