Tagged: by: Pete Bradley Toggle Comment Threads | Keyboard Shortcuts

  • Unknown's avatar

    Jim Randell 10:26 am on 21 March 2024 Permalink | Reply
    Tags: by: Pete Bradley   

    Brainteaser 1647: Happy Easter 

    From The Sunday Times, 3rd April 1994 [link]

    Here is a sum with an odd total in which digits have been consistently replaced by letters, different letters being used for different digits:

    Find the value of EGGS.

    [teaser1647]

     
    • Jim Randell's avatar

      Jim Randell 10:27 am on 21 March 2024 Permalink | Reply

      Using the [[ SubstitutedExpression ]] solver from the enigma.py library.

      The following run file executes in 76ms. (Internal runtime of the of the generated program is 85µs).

      Run: [ @replit ]

      #! python3 -m enigma -rr
      
      SubstitutedExpression.split_sum
      
      # the alphametic sum
      "DEAR + READER + HAPPY = EASTER"
      
      # the total is odd
      --extra="R % 2 = 1"
      
      --answer="EGGS"
      

      Solution: EGGS = 4882.

      The sum is: 1403 + 340143 + 60997 = 402543.

      Which assigns 9 of the ten digits, leaving G = 8.

      Like

    • GeoffR's avatar

      GeoffR 7:03 pm on 21 March 2024 Permalink | Reply

      from itertools import permutations
      digits = set('0123456789')
      
      for R in (1,3,5,7,9):
          r = str(R)
          q1 = digits - {r}
          for p1 in permutations(q1, 3):
              d, e, a = p1
              dear = int(d + e + a + r)
              reader = int(r + e + a + d + e + r)
              q2 = q1 - set(p1)
              for p2 in permutations(q2, 3):
                  h, p, y = p2
                  happy = int(h + a+ p + p + y)
                  EASTER = dear + reader + happy
                  easter = str(EASTER)
                  if easter[0] == e and easter[4] == e:
                      if easter[1] == a and easter[-1] == r:
                         s, t = easter[2], easter[3]
                         used = set((e, a, s, t, r, d, h, p, y))
                         if len(used) == 9:
                             g = digits - used
                             G = int(g.pop())
                             E, S = int(e), int(s)
                             EGGS = 1000*E + 110*G +  S
                             print(f"EGGS = {EGGS}")
                             print(f"Sum: {dear} + {reader} + {happy} = {EASTER}")
      # EGGS = 4882           
      # Sum: 1403 + 340143 + 60997 = 402543
      

      Like

    • Frits's avatar

      Frits 11:11 am on 22 March 2024 Permalink | Reply

      from functools import reduce
      
      # convert digits sequence to number
      d2n = lambda s: reduce(lambda x,  y: 10 * x + y, s)
      
      dgts = set(range(10))
      
      # R is odd as total is odd but not 5 (Y becomes 5) or 9 (E becomes 10)
      for R in [1, 3, 7]:
        if len(q1 := dgts - {R, E := R + 1, Y := 10 - R}) != 7: continue
        for A in q1:
          # carry + E + H = 10 + A --> A < carry + E
          if not (A < 2 + E): continue
         
          if len(q2 := q1 - {A, P := 9 - A}) != 5: continue
          APPY = d2n([A, P, P, Y])
          for D in q2:
            if D == 0: continue
            DEAR = d2n([D, E, A, R])
            READER = d2n([R, E, A, D, E, R])
         
            # sum last 4 columns
            carry, tot = divmod(DEAR + READER % 10000 + APPY, 10000)
            # carry + E + H = 10 + A
            H = 10 + A - carry - E
            if H in {0, D} or H not in q2: continue
           
            # tot must be equal to STER
            S, T = divmod(tot // 100, 10)
         
            if len(q3 := q2 - {D, H, S, T}) != 1: continue
           
            HAPPY = 10000 * H + APPY
            EASTER = d2n([E, A, S, T, E, R])
            if DEAR + READER + HAPPY != EASTER: continue
      
            print(f"answer: EGGS = {d2n([E, (G := q3.pop()), G, S])}")
            '''
            print()
            print(f"{DEAR:>6}")
            print(f"{READER:>6}")
            print(f"{HAPPY:>6}")
            print("------")
            print(f"{EASTER:>6}")
            '''
      

      Like

    • Ruud's avatar

      Ruud 6:42 am on 21 April 2024 Permalink | Reply

      Brute force, extremely simple, solution. Runs within 30 seconds …

      import itertools
      from istr import istr
      
      for d, e, a, r, h, p, y, s, t,g in istr(itertools.permutations("0123456789", 10)):
          if r.is_odd() and (d | e | a | r) + (r | e | a | d | e | r) + (h | a | p | p | y) == (e | a | s | t | e | r):
              print('eggs = ', e|g|g|s)
      

      Like

      • Frits's avatar

        Frits 10:55 am on 22 April 2024 Permalink | Reply

        Hi Ruud, with CPython your version runs for 140seconds on my PC. A similar program without the istr package runs for 3 seconds with CPython (PyPy is faster).

        from itertools import permutations
         
        for d, e, a, r, h, p, y, s, t, g in permutations("0123456789"):
          if (r in "13579" and "0" not in (d + r + h + e) and
              int(d+e+a+r) + int(r+e+a+d+e+r) + int(h+a+p+p+y) == int(e+a+s+t+e+r)):
            print('eggs = ', e+g+g+s)     
        

        Like

    • GeoffR's avatar

      GeoffR 11:10 am on 21 April 2024 Permalink | Reply

      Using primary school addition method of columns and carry digits.

      
      % A Solution in MiniZinc
      include "globals.mzn";
      
      var 1..9:D; var 1..9:E; var 0..9:A; var 1..9:R;
      var 0..9:S; var 0..9:T; var 0..9:G; var 1..9:H;
      var 0..9:P; var 0..9:Y;
      var 1000..9999:EGGS = 1000*E + 110*G + S;
      
      constraint R in {1,3,5,7,9};
      
      % Column carry digits from right hand end
      var 0..2:c1; var 0..2:c2; var 0..2:c3; var 0..2:c4; var 0..2:c5; 
      
      constraint all_different ([D, E, A, R, S, T, G, H, P, Y]);
      
      % Adding columns from the right hand end
      constraint (R + R + Y) mod 10 == R /\ c1 == (R + R + Y) div 10;
      constraint (c1 + A + E + P) mod 10 == E /\ c2 == (c1 + A + E + P) div 10;
      constraint (c2 + E + D + P) mod 10 == T /\ c3 ==  (c2 + E + D + P) div 10;
      constraint (c3 + D + A + A) mod 10 == S /\ c4 ==  (c3 + D + A + A) div 10;
      constraint (c4 + E + H) mod 10 == A /\ c5 == (c4 + E + H) div 10;
      constraint E == R + c5;
      
      solve satisfy;
      output ["EGGS = " ++ show(EGGS) ++ "\n" 
      ++ "([D, E, A, R, S, T, G, H, P, Y] = "  ++ show([D, E, A, R, S, T, G, H, P, Y]  )];
       
      % EGGS = 4882
      % ([D, E, A, R, S, T, G, H, P, Y] = 
      %  [1, 4, 0, 3, 2, 5, 8, 6, 9, 7]
      % ----------
      % ==========
      
      

      Like

  • Unknown's avatar

    Jim Randell 11:20 am on 2 November 2023 Permalink | Reply
    Tags: by: Pete Bradley   

    Brainteaser 1555: Riddle-me-ree 

    From The Sunday Times, 28th June 1992 [link]

    My first is a digit
    That is equal to “y”.
    My second’s not zero,
    But smaller than pi.

    My third, fourth and fifth
    You’ll find if you try,
    For my whole is the cube
    Of “x” squared plus “y”.

    “x” is an integer
    And so is “y”.
    I’ve only five digits,
    What number am I?

    [teaser1555]

     
    • Jim Randell's avatar

      Jim Randell 11:21 am on 2 November 2023 Permalink | Reply

      Here is a solution using the [[ SubstitutedExpression ]] solver from the enigma.py library.

      The following run file executes in 94ms. (Internal runtime of the generated code is 32ms).

      Run: [ @replit ]

      #! python3 -m enigma -rr
      
      # we are looking for: YABCD = (X^2 + Y)^3
      
      SubstitutedExpression
      
      --distinct=""
      --invalid="0,AY"
      --invalid="4|5|6|7|8|9,A"  # 2nd digit is 1, 2, 3
      
      # the 5-digit number is the cube of X^2 + Y
      "is_square(is_cube(YABCD) - Y)"
      
      --answer="YABCD"
      

      Or we can use a simple Python program:

      from enigma import (irange, nsplit, is_square, printf)
      
      # consider 5-digit cubes
      for i in irange(22, 46):
        n = i**3
        (y, a, _, _, _) = nsplit(n)
        if a == 0 or a > 3: continue
        x = is_square(i - y)
        if x is None: continue
        # output solution
        printf("{n} = ({x}^2 + {y})^3")
      

      Solution: The number is 91125.

      We have x = 6, y = 9, and:

      (6² + 9)³ = 91125

      Like

    • Ender Aktulga's avatar

      Ender Aktulga 11:12 am on 7 November 2023 Permalink | Reply

      Answer: 91125

      from math import sqrt
      
      i=0
      n=0
      while True:
          i+=1
          n=i**3
              
          if n=100000:
              break
          
          n2=int(str(n)[1])  #:[1]
          if n2==0 or n2>3:
              continue
      
          y=n//10000
          x=round(sqrt(i-y))
          if n!=(x**2+y)**3:
              continue
      
          print(f"{i=}, i^3={n=}, {x=}, i={x**2+y=}")
      
      """
      i=45, i^3=n=91125, x=6, i=x**2+y=45
      """
      

      Like

      • Jim Randell's avatar

        Jim Randell 8:21 am on 9 November 2023 Permalink | Reply

        Thanks for the comment, but if this is meant to be a Python program there seem to be some problems with it, because it doesn’t run.

        If you want to post a new comment with a revised version I can remove this version.

        When posting code it is best to wrap it in [code]...[/code] tags to make sure it appears correctly.

        Like

    • GeoffR's avatar

      GeoffR 9:53 am on 11 November 2023 Permalink | Reply

      cb5d = [x * x * x for x in range(22, 47)]
      
      for x in range(1, 10):
          for y in range(1, 10):
              n = (x * x + y) ** 3
              if n not in cb5d:continue
              # y is my first digit
              if str(n)[0] != str(y):continue
              # My second digit is not zero, but smaller than pi
              if str(n)[1] not in ('1', '2', '3'):continue
              print(f"My 5-digit number is {n}.")
      

      My 5-digit number is 91125.

      Like

    • GeoffR's avatar

      GeoffR 10:42 am on 12 November 2023 Permalink | Reply

      I updated the original 5-digit cube list to include a check on the 2nd digit of the 5-digit number. This reduced the original cube list from 25 potential candidates to 6 cubes to check.

      
      # list of 5-digit cubes with 2nd digit in range 1..3
      cb_5d = [x * x * x for x in range(22, 47)
              if str(x * x * x)[1] in ('1','2','3')]
      
      # find x and y values
      for x in range(1, 10):
          for y in range(1, 10):
              n = (x * x + y) ** 3
              # 5-digit number required
              if n < 10000:
                  continue
              if n in cb_5d:
                  # y is my first digit
                  if str(n)[0] == str(y):
                      print(f"My 5-digit number is {n}.")
      
      print(f"Candidate cube list was {cb_5d}")
      
      # My 5-digit number is 91125.
      # Candidate cube list was [12167, 13824, 21952, 32768, 42875, 91125]
      
      
      
      

      Like

  • Unknown's avatar

    Jim Randell 10:27 am on 8 December 2019 Permalink | Reply
    Tags: by: Pete Bradley   

    Brainteaser 1770: Magic spell 

    From The Sunday Times, 18th August 1996 [link]

    Marvo uses a prearranged pack of cards to perform the following trick. Holding the pack face downwards, one by one he would take a card from the top and place it on the bottom, calling out a letter each time so as to spell:

    A, C, E, [the next card is an ace, which is placed on the table]
    T, W, O, [next card is a 2]
    T, H, R, E, E, [next card is a 3]

    J, A, C, K, [next card is a Jack]
    Q, U, E, E, N, [next card is a Queen]
    K, I, N, G, [next card is a King]
    A, C, E, [next card is an ace]
    T, W, O, [next card is a 2]

    Once he had spelt out the name of the card he would remove the next card from the pack, turn it over and place it face up on the table. Of course it was always the card which he had just spelt out.

    In this way he worked through the clubs, then the hearts, then the diamonds and finally the spades, finishing with just the King of spades in his hand.

    One day his disgruntled assistant sabotaged his act by secretly cutting the pack. However the first card which Marvo turned over was still an ace, and the the second card was still a two.

    What was the next card Marvo turned over?

    This puzzle is included in the book Brainteasers (2002). The puzzle text above is taken from the book.

    [teaser1770]

     
    • Jim Randell's avatar

      Jim Randell 10:28 am on 8 December 2019 Permalink | Reply

      We can construct the initial configuration of the pack by starting with a pack of blank cards numbered in order from 1 to 52, and then performing the trick, but when we turn over one of the blank cards we write the appropriate value and suit on the card and continue until the end of the trick. We can then use the numbers to put the pack back into the desired order.

      We can then look through the pack for an ace followed 4 cards later by a two, and then we are interested what card occurs 6 cards after that.

      This Python program runs in 70ms.

      Run: [ @repl.it ]

      from enigma import irange, printf
      
      # words for each value
      word = {
        'A': 'ACE', '2': 'TWO', '3': 'THREE', '4': 'FOUR', '5': 'FIVE',
        '6': 'SIX', '7': 'SEVEN', '8': 'EIGHT', '9': 'NINE', 'X': 'TEN',
        'J': 'JACK', 'Q': 'QUEEN', 'K': 'KING',
      }
      
      # the positions in the pack
      pack = list(irange(0, 51))
      
      # map position -> value + suit
      m = dict()
      
      # go through the suits
      for s in "CHDS":
        # and then the values in each suit
        for v in "A23456789XJQK":
          # apply the operation the appropriate number of times
          for x in word[v]:
            pack.append(pack.pop(0))
          # reveal and discard the top card
          n = pack.pop(0)
          assert n not in m
          # record that card at this position
          m[n] = v + s
      
      # advance by counting value v
      advance = lambda k, v: (k + len(word[v]) + 1) % 52
      
      # look for an ace...
      for (k1, v1) in m.items():
        if v1[0] != 'A': continue
        # but not not the ace we are expecting
        if v1 == 'AC': continue
        # ... followed by a 2 ...
        k2 = advance(k1, '2')
        v2 = m[k2]
        if v2[0] != '2': continue
        # ... and what is the next card?
        k3 = advance(k2, '3')
        v3 = m[k3]
        printf("@{k1}: {v1} -> @{k2}: {v2} -> @{k3}: {v3}")
      

      Solution: The third card turned over is the three of diamonds.

      After that the trick would go awry. The next card turned over is not a 4, it is 8♦.

      The original layout of the pack is:

      After the pack is cut 4♣ is at the top (as highlighted in the diagram), after counting out A, C, E we get A♠, and then T, W, O gets 2♥, and then T, H, R, E, E gets 3♦.

      Like

  • Unknown's avatar

    Jim Randell 9:38 am on 17 October 2019 Permalink | Reply
    Tags: by: Pete Bradley   

    Brainteaser 1734: Scratchcard 

    From The Sunday Times, 10th December 1995 [link]

    Every Saturday The Daily Broadsheet gives readers a free scratchcard comprising two crosses and a number of ticks concealed beneath silver foil squares. Readers have to scratch just three of the squares to reveal what is beneath. Anyone who scratches only ticks can use the card to obtain a 50p discount on The Sunday Broadsheet. The probability of revealing three ticks, expressed as a percentage, is a whole number larger than 50%.

    To increase circulation the paper intends to increase the number of silver squares, still with only two crosses. This will increase the chances of finding ticks when scratching three squares, and again the probability will be a whole number percentage.

    How many more silver squares do they intend to add?

    This puzzle is included in the book Brainteasers (2002). The puzzle text above is taken from the book.

    [teaser1734]

     
    • Jim Randell's avatar

      Jim Randell 9:39 am on 17 October 2019 Permalink | Reply

      If there are n ticks (where n ≥ 3), then the probability of scratching off 3 ticks is:

      (n / (n + 2)) × ((n − 1) / (n + 1)) × ((n − 2) / n)
      = (n − 1)(n − 2) / (n + 1)(n + 2)

      This Python program finds values of n where this probability is an integer percentage, greater than 50%.

      Run: [ @repl.it ]

      from enigma import irange, inf, first, printf
      
      # find n, p where probability p is an integer percentage > m
      def solve(m):
        for n in irange(3, inf):
          (p, r) = divmod(100 * (n - 1) * (n - 2), (n + 1) * (n + 2))
          if r == 0 and p > m: yield (n, p)
          if p == 99 and r > 0: break
      
      # find the first two (n, p) values with p > 50
      ((n1, p1), (n2, p2)) = first(solve(50), 2)
      d = n2 - n1
      printf("{d} more squares [{n1} ticks -> {p1}%; {n2} ticks -> {p2}%]")
      

      Solution: They intend to add 9 more squares.

      With 16 squares (14 ticks and 2 crosses) the probability is 65%.

      With 25 squares (23 ticks and 2 crosses) the probability is 77%.

      In fact there are only 4 values for n which give an integer percentage for p:

      n = 3, p = 10%
      n = 4, p = 20%
      n = 14, p = 65%
      n = 23, p = 77%

      Like

  • Unknown's avatar

    Jim Randell 12:40 pm on 28 July 2019 Permalink | Reply
    Tags: by: Pete Bradley   

    Brainteaser 1633: New Year’s resolution 

    From The Sunday Times, 26th December 1993 [link]

    My New Year’s resolution is that this year I will remember my father’s birthday. To remind me I devised this formula: if I take the factorial of the number on the calendar representing the month in which he was born (1 for January to 12 for December) and multiply this by the square of the day of the month of his birth (1 to 31), the four digit result is the year when he was born.

    [Note, for example, that “6 factorial” is 6×5×4×3×2×1 = 720.]

    I then realised that this is no use for determining his birthday as even my own date of birth fits the formula.

    Can you tell me what is my father’s date of birth?

    This puzzle is included in the book Brainteasers (2002) under the title of “Birthday resolution”. The text was changed slightly, but the puzzle remains the same.

    [teaser1633]

     
    • Jim Randell's avatar

      Jim Randell 12:41 pm on 28 July 2019 Permalink | Reply

      This Python program finds day/month/year combinations that satisfy the formula, where the year is in the range [1850, 1993].

      It runs in 84ms.

      Run: [ @repl.it ]

      from enigma import irange, factorial, printf
      
      # number of possible days in each month
      days = (31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)
      
      # consider day, month, formula values
      for (m, dm) in enumerate(days, start=1):
        f = factorial(m)
        for d in irange(1, dm):
          y = f * d * d
          if y < 1850: continue
          if y > 1993: break
          printf("d={d} m={m} -> y={y}")
      

      Solution: The father’s birthdate is 4th May 1920.

      There are 3 day/month combinations that give a reasonable value for the year.

      These are:

      day=18, month=3 → year=1944
      day=9, month=4 → year=1944
      day=4, month=5 → year=1920

      So the setters birthdate must be one of the 1944 dates (18th March 1944, 9th April 1944) and his fathers birthdate must be 4th May 1920.

      But it seems to me that the setter would probably be able to remember that his father was not born in 1944, so he can use the formula to determine his fathers birthday.

      The setter is obviously not a fan of Star Wars, otherwise he would find it easy to remember his father’s birthday.

      Like

  • Unknown's avatar

    Jim Randell 9:07 am on 30 June 2019 Permalink | Reply
    Tags: by: Pete Bradley   

    Brainteaser 1611: Scrambled egg 

    From The Sunday Times, 25th July 1993 [link]

    When HUMPTY fell he broke into six pieces, each comprising one letter from his name, and they landed in a row to read as a rubbish six-letter word with none of the six piece in the correct position.

    The King’s horses tried to put HUMPTY together again by arranging the pieces in the reverse order, which meant that more than one piece was in the right place.

    The King’s men then split that arrangement into two threes and placed the last three pieces before the first. This gave a higher number of letters in the correct place.

    What was the arrangement of letters just after HUMPTY fell?

    This puzzle is included in the book Brainteasers (2002). The wording above is taken from the book. It is slightly changed from the original puzzle.

    [teaser1611]

     
    • Jim Randell's avatar

      Jim Randell 9:07 am on 30 June 2019 Permalink | Reply

      This Python program tries all possible derangements of the letters, and checks to see if the conditions are satisfied. It runs in 85ms.

      Run: [ @repl.it ]

      from enigma import (subsets, join, printf)
      
      # word with letters in their correct positions
      word = "HUMPTY"
      
      # count the number of correct letters
      def correct(w):
        return sum(a == b for (a, b) in zip(w, word))
      
      # find derangements of the word
      for w in subsets(word, size=len(word), select='P'):
        if correct(w) > 0: continue
      
        # reversing gives more than 1 piece in the correct position
        w1 = w[::-1]
        k1 = correct(w1)
        if not (k1 > 1): continue
      
        # putting the last 3 before the first 3 gives even more in the correct position
        w2 = w1[3:] + w1[:3]
        k2 = correct(w2)
        if not (k2 > k1): continue
      
        # output solution
        printf("{w} [{w1} -> {k1}, {w2} -> {k2}]", w=join(w), w1=join(w1), w2=join(w2))
      

      Solution: The arrangement after HUMPTY fell was MTHYUP.

      Like

  • Unknown's avatar

    Jim Randell 8:16 am on 25 April 2019 Permalink | Reply
    Tags: by: Pete Bradley   

    Brainteaser 1563: Family sum 

    From The Sunday Times, 23rd August 1992 [link]

    In this puzzle digits have been consistently replaced by letters, with different letters being used for different digits. This addition sum then makes sense:

    also AND is divisible by three.

    What is the number REAGAN?

    This puzzle is included in the book Brainteasers (2002). The wording is only slightly changed from the original puzzle.

    [teaser1563]

     
    • Jim Randell's avatar

      Jim Randell 8:17 am on 25 April 2019 Permalink | Reply

      This puzzle can easily be solved using the [[ SubstitutedExpression() ]] solver from the enigma.py library.

      The following run-file executes in 480ms.

      Run: [ @replit ]

      #! python3 -m enigma -rr
      
      SubstitutedExpression
      
      "RONALD + AND + NANCY = REAGAN"
      
      "AND % 3 = 0"
      
      --answer="REAGAN"
      

      Solution: REAGAN = 396168.

      The symbols L and C appear in the tens column, but not elsewhere, so their values can be interchanged. This gives rise to the two possible sums:

      308627 + 687 + 86854 = 396168
      308657 + 687 + 86824 = 396168

      Like

      • Jim Randell's avatar

        Jim Randell 8:41 am on 9 June 2023 Permalink | Reply

        For a faster solution we can use the [[ SubstitutedExpression.split_sum ]] solver.

        The following run file executes in 73ms. (Internal runtime of the generated program is 1.5ms).

        Run: [ @replit ]

        #! python3 -m enigma -rr
        
        SubstitutedExpression.split_sum
        
        "RONALD + AND + NANCY = REAGAN"
        
        --extra="AND % 3 = 0"
        
        --answer="REAGAN"
        

        Like

    • GeoffR's avatar

      GeoffR 12:20 pm on 25 April 2019 Permalink | Reply

      % A Solution in MiniZinc
      include "globals.mzn";
       
      var 0..9: R; var 0..9: O; var 0..9: N; var 0..9: A;  var 0..9: L; 
      var 0..9: D; var 0..9: C; var 0..9: Y; var 0..9: E;  var 0..9: G; 
      
      constraint R != 0 /\ A != 0 /\ N != 0;
      constraint all_different( [R,O,N,A,L,D,C,Y,E,G]);
      
      var 100..999: AND = 100*A + 10*N + D;
      var 10000..99999: NANCY = 10000*N + 1000*A + 100*N + 10*C + Y;
      
      var 100000..999999: RONALD = 100000*R + 10000*O + 1000*N 
      + 100*A + 10*L + D;
      
      var 100000..999999: REAGAN = 100000*R + 10000*E + 1000*A 
      + 100*G + 10*A + N;
      
      constraint AND mod 3 == 0;
      
      constraint RONALD + AND + NANCY == REAGAN;
      
      solve satisfy;
      
      output [show(RONALD) ++ " + " ++ show(AND) ++ " + " ++ 
      show(NANCY) ++ " = " ++ show(REAGAN)];
      
      % 308657 + 687 + 86824 = 396168
      % time elapsed: 0.02 s
      % ----------
      % 308627 + 687 + 86854 = 396168
      % time elapsed: 0.02 s
      %----------
      %==========
      
      

      Like

    • Frits's avatar

      Frits 1:44 pm on 9 June 2023 Permalink | Reply

        
      column 3: x + N + A = .A with x = 1,2,3 so N = 8,9,0
      
      column 2: y + O + N = E so either:
      
      N = 9, is not possible
      N = 8 and O = 0 and x = 2  
      N = 0 causes y to be zero but then O = E
      
      --> N = 8, O = 0, E = 9 and x = 2
      
      column 4:
      z + A + A + N = 2G so z + A + A >= 21 - 8 so A = 6,7
      
      using AND is divisible by three:
      (A, D, Y) is either (6, 7, 4) or (7, 3, 2)
      (A, D, Y, L+C) is either (6, 7, 4, 7) or (7, 3, 2, 9)
      (A, D, Y, {L, C}) is either (6, 7, 4, {2, 5}) or (7, 3, 2, {4, 5})
      
      (A, G) = (6, 1) as A = 7 causes G to be 3 (which is same as D)
      
      so (N, O, E, A, D, Y, G) = (8, 0, 9, 6, 7, 4, 1) with {L, C} = {2, 5}
      This leaves R = 3
      

      Like

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel
Design a site like this with WordPress.com
Get started