Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:N!的质因子分解

Posted by 123234345 at 2009-05-11 07:08:33 on Problem 1401
In Reply To:N!的质因子分解 Posted by:liangkangqi at 2006-05-12 10:08:45
> 例如:
> 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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator