Fixed deprecated imports. Now works with pypy3. Added pypy3 to README

master
Tibor Bizjak 2023-03-14 12:52:27 +01:00
parent 95fce120ce
commit fec6a3aca0
3 changed files with 9 additions and 7 deletions

View File

@ -6,12 +6,16 @@ To solve all puzzles with implemented solutions run
```console
$ python3 main.py
```
or alternatively make the main program executable
or alternatively make the main program executable.
```console
$ chmod +x main.py
$ ./main.py
```
For other options see `./main.py -h`
For faster execution use `pypy3`.
```console
$ pypy3 main.py
```
For other options see `./main.py -h`.
```console
$ ./main.py -h
usage: main.py [-h] [-d DAY[-DAY]] [-i INPUT] [-t]

View File

@ -1,6 +1,7 @@
#!/usr/bin/env python3
from fractions import gcd, Fraction
from math import gcd
from fractions import Fraction
from itertools import product
from functools import total_ordering
from collections import defaultdict

View File

@ -1,12 +1,9 @@
#!/usr/bin/env python3
from itertools import combinations
from fractions import gcd
from math import lcm
from functools import reduce
def lcm(a, b):
return (a * b) / gcd(a, b)
def comp(a, b):
def f(arg):
x, y = arg