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<iostream.h> typedef long long l64; l64 Cnm(l64 n,l64 m) { return m>0?(Cnm(n-1,m-1)*n)/m:1; } int main() { l64 m,n; while(cin>>n>>m&&m+n>0) cout<<Cnm(m+n,(m<n)?m:n)<<endl; return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator