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

Home > Numbers
Four generations (Posted on 2020-07-06) Difficulty: 3 of 5
Let S be a set of all six-digit integers.

Let S1 be a subset of S, including all members of S such that each consists
of distinct digits.
Let S2 be a subset of S1, including all members of S1 each with 5 being the difference between its largest digit and its lowest one.
Let S3 be a subset of S2, comprising all elements of S2 divisible by 143.

What is the cardinality of S3 ?

Explain your way of reasoning.

No Solution Yet Submitted by Ady TZIDON    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution apologies to steven | Comment 4 of 9 |
(In reply to re: part 1 via computer by Charlie)

I neglected to check for duplicate digits.


Corrected section of code:

    If highest - lowest = 5 Then
      good = 1
      For i = 2 To Len(ns)
        If InStr(ns, Mid(ns, i, 1)) < i Then good = 0
      Next
    
      If good Then ct = ct + 1: lastmemb = n: Text1.Text = Text1.Text & n & " "
    
    End If
    DoEvents

with this it finds no solutions so the cardinality is zero.

  Posted by Charlie on 2020-07-06 10:34:16
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 (7)
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