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 Nstd at 2010-04-07 17:02:03 on Problem 2696
可以不用for做,研究一下这个mod算法的规律就可以发现

令t=a%b

如果t=0,那结果就是t

否则 :

    如果a>0,那结果就是t;

   如果a<0,那结果就是t+b;

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