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 |
其实还有个投机的方法In Reply To:无意间发现简单的算法! Posted by:lovexx at 2006-07-25 23:53:44 就是现将原来那个数所有位上的数的和算出来保存为Sum,然后就乘吧,每次得出的一个数算算它所有位上数的和,如果和Sum不相等就显然不是循环数,倘若所有的乘积都满足这个条件,我们就“认为”它是循环数,因为不是循环数而每次的乘积都满足这个条件太困难了,尤其是位数比较长的时候。嘿嘿,用这种投机的方法Accept了 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator