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 |
Re:一个语句就决定是0ms 还是 tleIn Reply To:一个语句就决定是0ms 还是 tle Posted by:117474335 at 2010-09-28 17:06:40 #include <stdio.h> #include <stdlib.h> __int64 n, m ; __int64 C () { __int64 i, t = 1 , j = 2 ; n = m - n < n? m - n : n ; // 就是这句话 ; for (i = m; i > m - n ; i -- ){ t *= i ; while (t % j == 0 && j <= n){ t /= j ; j ++ ;}} return t ; } main () { while (scanf ("%I64d%I64d", &n, &m ) , n | m){ m += n; printf ("%I64d\n", C () ) ;} } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator