Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

44 lines (38 sloc) 1.5 KB
import os # NOQA
import sys # NOQA
import re # NOQA
import math # NOQA
import fileinput
from string import ascii_uppercase, ascii_lowercase # NOQA
from collections import Counter, defaultdict, deque, namedtuple # NOQA
from itertools import count, product, permutations, combinations, combinations_with_replacement # NOQA
from utils import parse_line, parse_nums, mul, all_unique, factors, memoize, primes # NOQA
from utils import chunks, gcd, lcm, print_grid, min_max_xy # NOQA
from utils import new_table, transposed, rotated # NOQA
from utils import md5, sha256, knot_hash # NOQA
from utils import VOWELS, CONSONANTS # NOQA
from utils import Point, DIRS, DIRS_4, DIRS_8 # NOQA
# Itertools Functions:
# product('ABCD', repeat=2) AA AB AC AD BA BB BC BD CA CB CC CD DA DB DC DD
# permutations('ABCD', 2) AB AC AD BA BC BD CA CB CD DA DB DC
# combinations('ABCD', 2) AB AC AD BC BD CD
# combinations_with_replacement('ABCD', 2) AA AB AC AD BB BC BD CC CD DD
# It's Intcode time again!
# from intcode import emulate
# TAPE = [int(x) for x in fileinput.input()[0].split(',')]
# TAPE += [0] * 100000
# GLOBAL_INPUTS = [0]
# vm = emulate(TAPE, 0, GLOBAL_INPUTS)
# try:
# resp = next(vm)
# except StopIteration:
# pass
total = 0
result = []
table = new_table(None, width=2, height=4)
for i, line in enumerate(fileinput.input()):
line = line.strip()
nums = parse_nums(line)
data = parse_line(r'', line)
if i == 0:
print(data)
You can’t perform that action at this time.