- 252 名前:デフォルトの名無しさん mailto:sage [2019/08/31(土) 10:58:35.47 ID:8/I1hpDH.net]
- >>245 Perl5、1千万以下、CPU: Core i5 M520@2.4GHz
use Time::HiRes qw(gettimeofday tv_interval); $t0 = [gettimeofday]; for (1..1e8) { push @s, $_ if /^(.)\1*$/; } $elapse = tv_interval($t0, [gettimeofday]); printf "@s\n%.3f[s]\n", $elapse; 実行結果 ~ $ perl 15_245.pl 1 2 3 4 5 6 7 8 9 11 22 33 44 55 66 77 88 99 111 222 333 444 555 666 777 888 999 1111 2222 3333 4444 5555 6666 7777 8888 9999 11111 22222 33333 44444 55555 66666 77777 88888 99999 111111 222222 333333 444444 555555 666666 777777 888888 999999 1111111 2222222 3333333 4444444 5555555 6666666 7777777 8888888 9999999 49.732[s]
|

|