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

求解10^x = 1 (mod 9*L/gcd(L,8))的满足x>0的最小解就是答案_证明内详

Posted by majia5 at 2008-10-07 12:49:19 on Problem 3696 and last updated at 2009-02-26 11:08:35
In Reply To:这题是怎么个思路?我只知道5还有8的偶数倍不行.....只知道枚举.... Posted by:zrO_Orz at 2008-10-06 22:36:13
求解10^x = 1 (mod 9*L/gcd(L,8))的满足x>0的最小解就是答案

由8构成的数A设有x位
那么A=8(10^0+10^1+...+10^(x-1));
很容易得到A=(8/9)*(10^x-1);
题目的要求就是A=0(mod L)
就是(8/9)*(10^x-1)=0(mod L);
->8*(10^x-1)=0(mod 9L);
->10^x-1=0(mod 9L/gcd(L,8));
->10^x =1 (mod 9L/gcd(L,8)); 


解法是先求phi(9L/gcd(L,8)),然后枚举其因子

比如:L=11;9L/gcd(L,8)=99;phi(9L/gcd(L,8))=60;解得10^2 =1 (mod 99),2是满足条件的最小的因子了

顺便给出1999999999的答案:
161290320


如果作为扩展,那么对于只由k(1<=k<=9)组成的数A,其位数为满足10^x =1 (mod 9L/gcd(L,k))中x的最小正整数解 

以上是个人证明不一定完全正确难免有错误,希望大家能指教
^_^

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