Commit 4977fe1c authored by Taddeus Kroes's avatar Taddeus Kroes

Made all problems executable for a Linux pc.

parent 0a0bd415
#!/usr/bin/env python
from itertools import permutations from itertools import permutations
for i, p in enumerate(permutations(range(10))): for i, p in enumerate(permutations(range(10))):
......
#!/usr/bin/env python
def is_resilient(n, d): def is_resilient(n, d):
if n == 1: if n == 1:
return True return True
......
#!/usr/bin/env python
from decimal import Decimal as D from decimal import Decimal as D
import re import re
......
#!/usr/bin/env python
def combos(A, B): def combos(A, B):
c = set() c = set()
......
#!/usr/bin/env python
from copy import copy from copy import copy
from sys import argv, exit, setrecursionlimit from sys import argv, exit, setrecursionlimit
......
#!/usr/bin/env python
def is_prime(n): def is_prime(n):
if n == 2: if n == 2:
return True return True
......
#!/usr/bin/env python
words = open('words.txt', 'r').read()[1:-1].split('","') words = open('words.txt', 'r').read()[1:-1].split('","')
def word_value(word): def word_value(word):
......
#!/usr/bin/env python
from numpy import array from numpy import array
m = array([l.split(',') for l in open('matrix.txt', 'r').readlines()], m = array([l.split(',') for l in open('matrix.txt', 'r').readlines()],
......
#!/usr/bin/env python
def digits(n): def digits(n):
return [n] if n < 10 else digits(n / 10) + [n % 10] return [n] if n < 10 else digits(n / 10) + [n % 10]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment