#!/usr/bin/env perl use strict; use warnings; my $n = <>; chomp $n; my @vs; for (my $i = 0; $i <= $n; $i++) { for (my $j = 0; $j <= $n; $j++) { push @vs, (2 ** $i) * (5 ** $j); } } @vs = sort {$a <=> $b} @vs; print join("\n", @vs);