All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Remainders (Posted on 2006-04-15) Difficulty: 4 of 5
A={the set of all positive integers leaving a remainder of 4 when divided by 45}
B={the set of all positive integers leaving a remainder of 45 when divided by 454}
C={the set of all positive integers leaving a remainder of 454 when divided by 4545}
D={the set of all positive integers leaving a remainder of 4545 when divided by 45454}

Find the smallest number in the intersection of
1)Sets A and B;
2)Sets A and B and C;
3)Sets A and B and C and D.

See The Solution Submitted by Jer    
Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 4 |

In UBASIC:

list
   10   N=45+4
   15   Incr=45
   20   while 1=1
   30   N=N+Incr
   40   if N@454=45 then
   50   :if Did=0 then print N;"B":Did=1:Incr=lcm(45,454):endif
   60   :if N@4545=454 then
   70   :if Did2=0 then print N;"BC":Did2=1:Incr=lcm(45,454,4545):endif
   80   :if N@45454=4545 then
   90   :print N;"BCD":end
  100   :endif:endif
  110   wend
OK
run
 499 B
 41359 BC
 35641667749 BCD
OK


  Posted by Charlie on 2006-04-15 18:39:50
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (10)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information