Post Reply 
July 2018 little math problem
07-26-2018, 03:42 AM
Post: #7
RE: July 2018 little math problem
(07-26-2018 12:16 AM)Albert Chan Wrote:  If using computer is allowed, I would use Picat Programming Language
Interesting. Never heard of that language.

I just used Python:
Code:
from itertools import permutations

def check(a, b, c, d, e, f, g, h, i):
    return len(set([a+b+c, c+d+e, e+f+g, g+h+i])) == 1

print [x for x in permutations(range(1, 10), 9) if check(*x)]
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
July 2018 little math problem - pier4r - 07-25-2018, 08:52 PM
RE: July 2018 little math problem - DavidM - 07-26-2018, 04:03 AM
RE: July 2018 little math problem - DavidM - 07-26-2018, 03:38 PM
RE: July 2018 little math problem - Thomas Klemm - 07-26-2018 03:42 AM
RE: July 2018 little math problem - pier4r - 07-26-2018, 12:36 PM
RE: July 2018 little math problem - pier4r - 07-27-2018, 10:03 AM
RE: July 2018 little math problem - DavidM - 07-28-2018, 04:22 PM
RE: July 2018 little math problem - pier4r - 08-01-2018, 02:13 PM



User(s) browsing this thread: 1 Guest(s)