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 |
我觉得你想得太直接吧,其实用不着直接求每个eulerphi(inside)In Reply To:Re:你贴一下程序 Posted by:comerpass at 2005-07-15 01:39:21 考虑phi(n/p)*p=n*PI(1-1/pi),pi是n/p的因子,所以只需要把n分解因数,用dp枚举一下每个质因子的个数就可以算出来了。我的dp是写成dfs的形式的。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator