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:前人好办法。。PF

Posted by lzq08ms at 2011-04-26 19:10:10 on Problem 2551
In Reply To:前人好办法。。PF Posted by:taoy at 2007-11-20 21:30:22
>    只用余数乘以10+1就可以了。。。
>     如:3 满足题意能除以它的最小数111 , 答案是3
>    分析:1%3*10+1=11  j = 1
>         11%3*10+1=21  j =2
>         21%3=0     j=3 
>    相当于:1%3 
>           11%3
>           111%3(因为高位的110%3=2 和11%3=2效果相同吗!!, 高位除的余数正好为上次模的结果。。所以只求余数*10+1就可以拉)
太牛叉了,佩服

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