From 3399a560c617590169660d034c729e620af4e7fb Mon Sep 17 00:00:00 2001 From: Daniel Mantovani Date: Mon, 1 Apr 2019 16:06:03 -0300 Subject: Create ch-2.sh --- challenge-002/daniel-mantovani/perl5/ch-2.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 challenge-002/daniel-mantovani/perl5/ch-2.sh diff --git a/challenge-002/daniel-mantovani/perl5/ch-2.sh b/challenge-002/daniel-mantovani/perl5/ch-2.sh new file mode 100644 index 0000000000..0507c39f1c --- /dev/null +++ b/challenge-002/daniel-mantovani/perl5/ch-2.sh @@ -0,0 +1,3 @@ +perl -E '$r=$r*35 + ($_ gt '9' ? -55 + ord : $_) for split "", shift;say $r' 'PERL5' + +perl -E '$_=shift;while ($_) {unshift @m, $_ % 35;$_=int($_/35)};say map {$_>9?chr 55+$_:$_} @m' 38149690 -- cgit