This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env raku | |
my $num = 17; | |
my @test = '317 1 17 4' xx 3; | |
@test[0] ~~ s/«$num»/XX/; | |
@test[1] ~~ s/..<?after «17»>/YY/; | |
@test[2] ~~ s/..<?after «$num»>/ZZ/; | |
.say for @test; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
..#...#..#.....##..#.....##.####..#.#.##...#......#...##.#.###.###.#.....#.####.##..##.....#####.###..###....#.#.###.#.#.....### | |
###...#...#...#..#..#.#.##..#...##.####..#####....##.##.#.#.##....#..#....#..#....#.#.#..##...#.#...###....###.....###..#.####.. | |
.####.#....#.#.#.#.###.###.##.###..#...#..#.######.#.#....######.###.#..#..####.#.##..####..#..#...##....#.#..#.....#....##.###. | |
.##..##..#.......######.#.#.###....#.##..#.##.#...##.....#..##......###..######...##....###.#...##.#.#....#..#..#..##.#......#.. | |
####.##.......####.#.#.#...#....####.##.##.....##.##..#####.##...##.#..#.##.##....#.#..###..##.#.#..####.##...####..#.##.#.####. | |
#...##...######...##..#...#.#......##....######..#.####....#.....###..#.#..#.##.##.###..##...##....#....###.....#.##..#..#####.. | |
..#........#..###.##....##.#.#......#.#.#.#...####.....##....##.#...##.##.#.#..#####.####.#..#......#....#######..#.#...#..#...# | |
.###....##.##.....#...#..##.##...#.#.##....##.#.#.##.##..##.###.####.......##....#####....#.#.#..#.####.#....##..#..###.. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/perl | |
# See http://adventofcode.com/2016/day/10 | |
# | |
# Takes the input filename as a command-line argument, or uses | |
# 10_input_bot_instructions by default. | |
# | |
# by Smylers https://twitter.com/Smylers2 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Diagram for Martin Gardner's long division puzzle, question 2 at: | |
https://www.theguardian.com/science/2016/oct/24/can-you-solve-it-two-tantalising-teasers-from-the-prince-of-puzzles | |
abcde | |
┏━━━━━━━━ | |
fgh┃ijklmnop | |
-qrs↓↓↓↓ | |
━━━━↓↓↓↓ | |
tumn↓↓ | |
-vwx↓↓ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/perl | |
# number_puzzle_solver | |
# | |
# Given a target and a bunch of other numbers, find arithmetical expressions | |
# that use all the numbers to make the target. | |
use v5.14; | |
use warnings; |