Skip to content

Instantly share code, notes, and snippets.

@meru-akimbo
Created May 29, 2012 14:40
Show Gist options
  • Save meru-akimbo/2828796 to your computer and use it in GitHub Desktop.
Save meru-akimbo/2828796 to your computer and use it in GitHub Desktop.
B - さかさま辞書
chomp($tango_num = <STDIN>);
while(<STDIN>){
@w = split(//, $_);
@w = reverse(@w);
$s = join('', @w);
push @list , $s;
}
@list = sort @list;
for(@list){
@w = split(//, $_);
@w = reverse(@w);
$s = join('', @w);
print $s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment