Iata cateva solutii cu computerul (sage, pentru ca are toate sicanele de care am sau nu am nevoie deja implementate...)
La unele din ele trebuie sa stim si ceva matematica.
Problema data este echivalenta cu a rezolva ecuatia diofantiana
care implica imediat ca x este divizibil cu 10, x=10x', x' din ZZ, deci avem de rezolvat echivalent
Iata ce se poate tipari...
sage: for n in range( 1000):
....: if ( 2011*n ) % 1000 == 201:
....: print n
....:
291
sage: for n in range( 10000 ):
....: if ( 2011*n ) % 10000 == 2010:
....: print n
....:
2910
sage: Q = ContinuedFractionField()
sage: a = Q( 2011/1000 )
sage: a.convergents()
[2, 181/90, 183/91, 2011/1000]
sage: 183/91 - 2011/1000
-1/91000
sage: 91*2011 - 183*1000
1
sage: 91*201
18291
sage: ( 91*201 ) % 1000
291
sage: F = GF(2011); F
Finite Field of size 2011
sage: F(-201) / F(1000)
585
sage: ( 585*1000 + 201 ) % 2011
0
sage: ( 585*1000 + 201 ) / 2011
291
sage: 10^2010 % 2011
1
sage: factor(2010)
2 * 3 * 5 * 67
sage: 10^( 2010/2 ) % 2011
2010
sage: 10^( 2010/3 ) % 2011
1
sage: 10^( 2010/5 ) % 2011
1958
sage: 10^( 2010/67 ) % 2011
1798
sage:
sage: 10^(2010-3) % 2011
1828
sage: 10^(2010/2-3) % 2011
183
sage: -183 % 2011
1828
sage: 10^(2010/3-3) % 2011
1828
sage: 10^(2010/6-3) % 2011
183
sage: F = GF( 2011 ); F
Finite Field of size 2011
sage: 1 / F(1000)
1828