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 |
此题递归就可以0MSint PHI( int &Integer ) { int Uplimit = (int)sqrt(Integer) ; for( int item = 2; item <= Uplimit; item++ ) if( !nprim[item] && Integer % item == 0 ) if( Integer / item % item == 0 ) return item * PHI( Integer /= item ) ; else return (item-1) * PHI( Integer /= item ) ; return Integer - 1 ; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator