Skip to content

Instantly share code, notes, and snippets.

@tsurumau
Created September 15, 2013 13:10
Show Gist options
  • Save tsurumau/6570629 to your computer and use it in GitHub Desktop.
Save tsurumau/6570629 to your computer and use it in GitHub Desktop.
数理論理学ゼミ合宿 演習問題での検算
#!/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