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:没有理由啊!这样也能过哈!

Posted by 200730690105 at 2009-10-26 23:09:17 on Problem 1604
In Reply To:没有理由啊!这样也能过哈! Posted by:zhangliqiang at 2007-09-13 13:21:33
因为10000以内有个3125=5^5,这个3125与32相乘就是100000
而3125*5>10000,因此在10000以内的一次乘法中如果两个乘数的最后1位都不为0,那么最多能产生100000,而计算最后一个非零位恰恰要保证每一步的乘法在取余后不能全为0,因此%1000000正好(执行到乘以3125或3125的倍数的时候最后5位全部为0)

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