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

Home > Just Math
Divisible by 198 (Posted on 2016-05-12) Difficulty: 3 of 5
N is a positive integer entirely formed by the digits 0,1,2,3 and 5 such that N is evenly divisible by 198.(Each of these five digits must occur at least once in N. None of the remaining five digits can occur in N.)

Determine the minimum value of N.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution Comment 2 of 2 |
The 100 lowest possible values of N:

1232550
1235520
1252350
1255320
1532520
1552320
2103552
2105532
2123550
2125530
2153052
2153250
2155032
2155230
2301552
2305512
2321550
2325510
2351052
2351250
2355012
2355210
2501532
2503512
2521530
2523510
2551032
2551230
2553012
2553210
3212550
3215520
3252150
3255120
3512520
3552120
5103252
5105232
5123052
5123250
5125032
5125230
5212350
5215320
5232150
5235120
5301252
5305212
5321052
5321250
5325012
5325210
5501232
5503212
5512320
5521032
5521230
5523012
5523210
5532120
10023552
10025532
10053252
10055232
10223532
10253232
10320552
10322532
10323522
10325502
10350252
10352232
10353222
10355202
10520532
10523502
10550232
10553202
11013552
11015532
11033352
11035332
11053152
11055132
11132550
11135520
11152350
11155320
11231550
11233530
11235510
11251350
11253330
11255310
11310552
11315502
11330352
11332530
11333520
11335302

DefDbl A-Z
Dim crlf$, ct(), solct

Private Sub Form_Load()
 Form1.Visible = True
 crlf = Chr(13) + Chr(10)
 Text1.Text = ""
 
 For i = 1 To 100000
   n = n + 198
   ReDim ct(9)
   ns$ = LTrim(Str(n))
   good = 1: diffct = 0
   For j = 1 To Len(ns)
     DoEvents
     d = Val(Mid(ns, j, 1))
     If d > 5 Or d = 4 Then good = 0: Exit For
     ct(d) = ct(d) + 1
     If ct(d) = 1 Then diffct = diffct + 1
   Next
   If good Then
     If diffct = 5 Then
       Text1.Text = Text1.Text & n & crlf
       solct = solct + 1
       If solct = 100 Then Exit For
     End If
   End If
 Next

 Text1.Text = Text1.Text & crlf & " done"
  
End Sub


  Posted by Charlie on 2016-05-12 10:05:07
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 (11)
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