-
-
Save RayMPerry/0755df10463608e8b761b978fb194285 to your computer and use it in GitHub Desktop.
pain
This file contains 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
use v6; | |
say "({ .[0] }) * ({ .[1]}) = ({ [*] $_ })" if .sum == 2020 for 'input.txt'.IO.lines.map({ .Int }).combinations: 2; | |
say "({ .[0] }) * ({ .[1]}) * ({ .[2] }) = ({ [*] $_ })" if .sum == 2020 for 'input.txt'.IO.lines.map({ .Int }).combinations: 3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment