| ||||||||||
| 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 | |||||||||
前人好办法。。PF 只用余数乘以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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator