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 |
N!的质因子分解例如: 20! 1.先求出20以内的素数,(2,3,5,7,11,13,17,19) 2.再求各个素数的阶数 e(2)=[20/2]+[20/4]+[20/8]+[20/16]=18; e(3)=[20/3]+[20/9]=8; e(5)=[20/5]=4; ... e(19)=[20/19]=1; 所以 N!=2^18*3^8*5^4*...*19^1 因此,如果要求N!后面有多少个0,只要求出有多少个5就行了....... Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator