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 WAkeeper7 at 2009-08-16 13:20:23 on Problem 1597
In Reply To:谁证明一下 Posted by:fly_away at 2006-08-25 12:06:21
f(x+1) = (f(x-1) + s) mod m;
f(x+1) = (f(x-1) mod m + s mod m) mod m
假设f(0) = 0
那么 f(x) 只能取到 相差 (s,m)的数
除非 ( s , m ) == 1 能取到所有

如果 f(0) != 0 且 ( s , m ) != 1,就没有能取到0的了
所以条件是( s , m ) == 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