We're a place where coders share, stay up-to-date and grow their careers.
#! /usr/bin/perl use warnings; use strict; use feature qw{ say }; use Math::BigInt; chomp( my $cases = <> ); for my $case (1 .. $cases) { chomp( my $n = <> ); (my $i = $n) =~ tr/4/3/; my $j = 'Math::BigInt'->new($n) - 'Math::BigInt'->new($i); say "Case #$case: $i $j"; }
Discussion on: Coding Puzzles: Week of 4/8
Replies for: Friday (CodeJam): Foregone Solution codingcompetitions.withgoogle.com/...