Created
September 15, 2013 13:10
-
-
Save tsurumau/6570629 to your computer and use it in GitHub Desktop.
数理論理学ゼミ合宿 演習問題での検算
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use bigint; | |
my $s = 37038733764462037052->as_bin; | |
$s =~ s/^0b//; | |
print "$s\n"; | |
while ($s =~ s/1(?!,)(0*)/(length $1).','/e) {}; | |
$s =~ s/,$//; | |
print "<$s>\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment