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

不用打表,不用搜索,直接模拟,过了

Posted by wyu_feng at 2009-08-04 15:23:16 on Problem 1426
因为给出的数最大是200,所以他的余数最多只有199个
1开始每次记录他不同的余数,每次余数记录一种情况:
例如19
情况   余数
1     1
10    10
11    11
100   5
101   6
……
1111  9
…………
11001 OK!
每次进一位:1,10,100,1000……
用其的(余数+上面各种余数不同的情况)%19,得出不同余数存起来
程序很乱就不发了
5561560 wyu_feng 1426 Accepted 256K 0MS C++ 1241B 2009-08-04 15:12:47 

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