标签:style blog http io color os ar sp strong
HDU 1142 Factorial ( 算术基本定理 + 分解N! )
#include <cstdio> int main() { int t, n; scanf( "%d", &t ); while( t-- ) { scanf( "%d", &n ); int cnt = 0; while( n ) { cnt += n/5; n /= 5; } printf( "%d\n", cnt ); } return 0; }
HDU 1142 Factorial ( 算术基本定理 + 分解N! )
标签:style blog http io color os ar sp strong
原文地址:http://www.cnblogs.com/BigBallon/p/4062107.html