diff --git a/2015/day5/input.txt b/2015/day5/input.txt new file mode 100644 index 0000000..e69de29 diff --git a/2015/day5/problem.txt b/2015/day5/problem.txt new file mode 100644 index 0000000..f76538d --- /dev/null +++ b/2015/day5/problem.txt @@ -0,0 +1,16 @@ +--- Day 5: Doesn't He Have Intern-Elves For This? --- +Santa needs help figuring out which strings in his text file are naughty or nice. + +A nice string is one with all of the following properties: + +It contains at least three vowels (aeiou only), like aei, xazegov, or aeiouaeiouaeiou. +It contains at least one letter that appears twice in a row, like xx, abcdde (dd), or aabbccdd (aa, bb, cc, or dd). +It does not contain the strings ab, cd, pq, or xy, even if they are part of one of the other requirements. +For example: + +ugknbfddgicrmopn is nice because it has at least three vowels (u...i...o...), a double letter (...dd...), and none of the disallowed substrings. +aaa is nice because it has at least three vowels and a double letter, even though the letters used by different rules overlap. +jchzalrnumimnmhp is naughty because it has no double letter. +haegwjzuvuyypxyu is naughty because it contains the string xy. +dvszwmarrgswjxmb is naughty because it contains only one vowel. +How many strings are nice? \ No newline at end of file diff --git a/2015/day5/solution.py b/2015/day5/solution.py new file mode 100644 index 0000000..1718043 --- /dev/null +++ b/2015/day5/solution.py @@ -0,0 +1,10 @@ + +if __name__ == '__main__': + + print("All test passed") + + puzzle_input = open("input.txt", "r").readline() + print("solution: ", ) + + print("Part2: ") + print("solution: ", )