You see it in the movies all the time. The good/bad guy plugs a (large or small, depending upon the age of the movie), device into the safe/door lock/ATM/whatever and the LCD/LED/NIXIE tube display rolls through the 6/8/10 digit password/pin blurringly fast and, one by one, the digits become static as the device 'cracks' the code.
So, supplied with a command line argument, D, indicating the number of (numeric) digits, code a routine that picks (fairly) a random code, C, in the range 0 .. 1eD -1, and then scrolls the display (sequentially or randomly), until the first digit (left most) matches the first digit of C. Then scrolls the remaining digits until second digit matches the second digit of C; and so on until the randomly selected code is completely matched.
Rules: every character used, including command line (excepting "perl" and any preceding path), but including all switches and other CLI syntax; and every character of any non-pre-existing (as of midnight 11th September 2008) CPAN/core modules. Lowest character count wins.
(+10 for any solution that runs more than 2.5 minutes (average time for a 'tense' movie scene (guestimate:)), for a 10 digit code.)
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
Re: Golf: Movie style code cracker.
by blokhead (Monsignor) on Sep 12, 2008 at 19:24 UTC
|
Fun. Here's my interpretation of what a scrolling hacker toy would look like...
It's 90 characters.
$n=pop;for(;;){warn$f,map(int rand 10,1..$n),$/;++$i%1e3 or$f.=int ran
+d 10 and$n--or last}
You could make it run for >2.5 minutes by ... replacing 1e3 with something like 1e8, presumably
Update:
Here is another one that fills in the fixed positions not left-to-right, but randomly, to look more Matrix-like. As it gets more and more characters fixed, it slows down to increase the drama (this is me trying to sell a design inefficiency as a feature). It's 124 characters.
@x=("%d")x($n=pop);$"="";for(;;){printf"@x\n",map(int rand 10,1..$n);+
++$i%500 or$n-=$x[rand@x]=~s/../int rand 10/e or last;}
On my machine, it looks nice doing 20-digit combinations.
| [reply] [d/l] [select] |
|
You're not matching the randomly chosen code C. On your way to decipher C, you would have likely iterated through the "correct" left-digits of C a few times before "locking" in.
| [reply] |
Re: Golf: Movie style code cracker.
by zentara (Archbishop) on Sep 12, 2008 at 19:47 UTC
|
I didn't see anything about no Tk. :-) I don't care about golf, I want it to look realistic as in a movie. Jason Bourne uses this because it looks cool! :-)
#!/usr/bin/perl
use warnings;
use strict;
use Tk;
my $dig_num = shift || 7;
my $bignum = 10**$dig_num;
#print "$bignum\n";
my $rand = int rand $bignum;
my @coded = $rand =~ /\d{1}/g;
print "@coded\n";
my @slots = ( 1 .. scalar @coded );
my $mw = MainWindow->new;
$mw->title("$rand");
$mw->fontCreate(
'big',
-family => 'arial',
-size => 38
);
my %lab;
foreach my $num ( @slots ) {
$lab{ $num }{ 'count' } = 0;
$lab{ $num }{ 'done' } = 0;
$lab{ $num }{ 'label' } = $mw->Label(
-bg => 'black',
-fg => 'green',
-font => 'big',
-textvariable => \$lab{ $num }{ 'count' },
)->pack( -side => 'left', -fill => 'x', -expand => 1 );
}
$mw->Button( -text => 'Go', -command => \&click )->pack();
MainLoop;
sub click {
my $watch = shift @coded;
my $sel = 1;
# print "$watch $sel\n";
my $timer;
$timer = $mw->repeat(
10,
sub {
foreach my $num ( @slots ) {
if ( $lab{ $num }{ 'done' } == 1 ) { next }
else {
$lab{ $num }{ 'count' } = int rand 10;
}
if ( $lab{ $sel }{ 'count' } == $watch ) {
$lab{ $sel }{ 'done' } = 1;
$watch = shift @coded;
if( ! defined $watch ){$timer->cancel}
else{
$sel++;
#print "$watch $sel\n";
}
}
}
}
);
}
__END__
| [reply] [d/l] |
Re: Golf: Movie style code cracker.
by kyle (Abbot) on Sep 12, 2008 at 16:33 UTC
|
OK, I'll bite. 139 characters.
perl -le'sub r{join"",map{int rand 10}1..$_[0]}$C=r($l=shift);while($t
+!=$C){print"$t";($r)="$t-$C"=~/^(.*).*-\1/;$t=$r.r($l-length$r)}print
+"$t"' 10
Some bug-like things:
- It compares its guesses with the target number using "!=" (shorter than "ne" with spaces), so it goes goofy if you ask for a large number.
- The first "guess" is an empty string.
It does not take 2.5 minutes to run. On my machine, it's less than .1 sec, actually. Perhaps a slow motion camera or digital special effects department could compensate.
| [reply] [d/l] [select] |
Re: Golf: Movie style code cracker.
by mr_mischief (Monsignor) on Sep 12, 2008 at 16:52 UTC
|
I'm sure it will be beat, but here's a first stab at it with 137 characters. It doesn't do any fancy screen control to keep it all on the same line, which some movie versions probably would.
Consider it 125 characters if you don't want to see the random code for reference. As a middle ground, how about 128 for seeing the original on every line?
$d=pop;$t.=0,$c.=int rand 10 for 1..$d;print"$c\n";do{$m++while(substr$t,$m,1)eq substr$c,$m,1;(substr$t,$m,1)++;print"$t\n"}until$t eq$c
$d=pop;$t.=0,$c.=int rand 10 for 1..$d;do{$m++while(substr$t,$m,1)eq substr$c,$m,1;(substr$t,$m,1)++;print"$t\n"}until$t eq$c
$d=pop;$t.=0,$c.=int rand 10 for 1..$d;do{$m++while(substr$t,$m,1)eq substr$c,$m,1;(substr$t,$m,1)++;print"$c:$t\n"}until$t eq$c
I've always wondered how many people notice that it's smarter to check the whole passcode as a unit than to be able to short circuit each character match. I guess the tension doesn't quite build the same when the WOPR just keeps failing as when the camera shows it getting closer, though. Joshua even had the advantage of scrolling all the digits simultaneously and locking each in separately from those before it in the code. At least they made the end of the world base 36.
Update: added spoiler tags
Update 2008-09-12, 18:27 UTC:
How about 122 for seeing the original on every line and
119 for never seeing it?
$t.=0,$c.=int rand 10 for 1..pop;do{$m++while(substr$t,$m,1)eq substr$c,$m,1;(substr$t,$m,1)++;print"$c:$t\n"}until$t eq$c
and
$t.=0,$c.=int rand 10 for 1..pop;do{$m++while(substr$t,$m,1)eq substr$c,$m,1;(substr$t,$m,1)++;print"$t\n"}until$t eq$c
| [reply] [d/l] [select] |
|
Changes from your 2008-09-12, 18:27 UTC update, plus find $m the way I did, plus a few other little changes...108 strokes.
$t.=0,$c.=int rand 10 for 1..pop;($m)="$t-$c"=~/^(.*).*-\1/,(substr$t,
+length$m,1)++,print"$t\n"until$t eq$c
I wish I'd thought of using pop instead of shift.
| [reply] [d/l] [select] |
Re: Golf: Movie style code cracker.
by duelafn (Parson) on Sep 12, 2008 at 17:24 UTC
|
122, but the true "movie version" is longer
# 123456789_123456789_123456789_123456789_123456789_123456789_1
+23456789_123456789_123456789_123456789_123456789_123456789_12
perl5.10 -E'$l=pop;sub r(){int rand 10}@x=map r,1..$l;while(@h<@x){@g=
+map$h[$_]//r,0..$l-1;push@h,$g[@h]if$g[@h]==$x[@h];say@g}' 16
Movie Version: clear line and slowdown (approx 3 min)
perl5.10 -E'$l=pop;sub r(){int rand 10}@x=map r,1..$l;$|=1;print@x;whi
+le(@h<@x){@g=map$h[$_]//r,0..$l-1;push@h,$g[@h]if$g[@h]==$x[@h]&&"111
+1"==r.r.r.r;print"\b"x$l," "x$l,"\b"x$l,@g}say' 16
Update: make movie version spin wheels more to break 2.5min bonus point time.
| [reply] [d/l] [select] |
|
I know BrowserUK stated "including all switches and other CLI syntax", but I'm not sure that includes the arguments to the program itself and the space before it. Those are constants other than the length of the argument. Perhaps we need that clarified.
If that really counts we can trim one character just by making it 6 or 8 digits instead of 10 or 16. If not, you're down to 119.
While we're clarifying minor rule variations, mine doesn't use any command-line switches to perl, so I was counting on it being in a file and not counting the ' -e'. Do I then need to count the '#!' or the name of the file? If so, just run perl and paste my solution into STDIN. ;-) Do I then need to count the ctrl-D for end of file?
| [reply] |
|
It took me a while to work out how to speed it up so I could check it would produce all the digits 0..9. I love the use of statistics to control the matching speed. '1111'==r.r.r.r is soo cool.
You can gain a couple of strokes by dropping the prototype on the sub.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
Re: Golf: Movie style code cracker.
by shmem (Chancellor) on Sep 12, 2008 at 23:34 UTC
|
(+10 for any solution that runs more than 2.5 minutes (average time for a 'tense' movie scene (guestimate:)), for a 10 digit code.)
Uh. Two and a half minutes for guessing a 10 digit code? That's a challenge for the book writer. If I had a television, I would start zapping. In the cinema, I'd leave for the toilet, and get a beer. Anyways, 86 strokes.
perl -le'$#a=$d=pop;sub r{int rand 9}while($c<$d){$c++if$a[$c]==r;@a[$
+c..$d]=(r)x$d;print@a}' 10
Well, that displays each "guess" on a line. Making that into one line adds some chars - 97:
perl -e'$#a=$d=pop;sub r{int rand 9}while($c<$d){$c++if$a[$c]==r;@a[$c
+..$d]=(r)x$d;print@a,"\r"}print$/' 10
But then, it's so fast you won't see the iterations... slowing down takes more chars (often seen in perl ;-)
perl -e'$#a=$d=pop;sub r{int rand 9}while($c<$d){$c++if$a[$c]==r;for(0
+..1e4){@a[$c..$d]=(r)x$d;print@a,"\r"}}print$/' 10
110 chars... I'm sure that can be reduced.
| [reply] [d/l] [select] |
|
Just throw in a ninja battle, 2.5 minutes will go by in no time!
--
I'd like to be able to assign to an luser
| [reply] |
|
I like your 110 stroke version. Though I'd have to penalise for never producing a '9' in the final code.
However, on my system at least, you could trade the extra stroke of rand 10 for ommitting the final print$/ as the system supplies one when the program ends.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
Re: Golf: Movie style code cracker.
by atcroft (Abbot) on Sep 12, 2008 at 17:50 UTC
|
Would 115 characters (123 characters, including the 'perl ' and ' 10') be good?
perl -e'$|=1;$e=shift;$c=10**$e;$d=int rand$c;
$c=0;while($c!=$d){printf"%0${e}d%s",$c,"\b"x$e;$c++}
print"$d $c\n"' 10
Update: (2008-09-12) In haste I forgot about the following in the description: "...then scrolls the display (sequentially or randomly), until the first digit (left most) matches the first digit of C. Then scrolls the remaining digits until second digit matches the second digit of C; and so on until the randomly selected code is completely matched." My solution does not accomplish this, but acts as a simple odometer instead. :(
| [reply] [d/l] |
Re: Golf: Movie style code cracker.(My attempt:77)
by BrowserUk (Patriarch) on Sep 13, 2008 at 08:49 UTC
|
My best so far (I put at 77) (Update:Don't forget to s/"/'/g on *nix):
-l15e"for$d(0..($n=pop)-1){$x[$d+rand$n-$d]=rand(10)&15,print@x,for+1.
+.1e5}"
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
|
| [reply] [d/l] |
Re: Golf: Movie style code cracker.
by toolic (Bishop) on Sep 12, 2008 at 20:01 UTC
|
Here is my lame submission: 172
perl -e'$d=shift;$c=sprintf"%0${d}d",int rand 10**$d;@n=split//,$c;x()
+;for(0..$#n-1){$m.=$n[$_];$d--;x();}print$c,$/;sub x{for(1..1e5){prin
+tf"$m%0${d}d\n",int rand 10**$d}}' 10
It runs for about 15 seconds (10 digits), but will take 10 times as long (150 seconds, or 2.5 minutes) by changing "1e5" to "1e6".
| [reply] [d/l] |
Re: Golf: Movie style code cracker.
by vrk (Chaplain) on Sep 12, 2008 at 20:44 UTC
|
124 characters, with the following features:
- Digits are displayed on a single line instead of scrolling the screen. (Tested only on Linux with bash.)
- Execution takes anything between $D and $D*10 seconds to run, when using base 10. Thus, if $D == 10, the program may run for as long as 100 seconds or 1 m 40 s. $D == 15 will break the "bonus barrier".
perl -e'$|++;split//,int rand 10**pop;sub f{$.=++$.%10;print$.;sleep 1
+,print"\b";$.==$_[0]||&f;print
shift;@_&& &f}&f;print"\n"' 10
You may additionally add ."\a" after print shift to produce a bell sound after a digit has been successfully found. That increases character count to 129.
The OP is ambiguous, though. It says pick a number between 0 and 1e$D-1, but doesn't say whether it should contain prefix zeroes or not. My code doesn't produce prefix zeroes.
| [reply] [d/l] [select] |
|
| [reply] |
Re: Golf: Movie style code cracker.
by hypknotizzed (Beadle) on Sep 13, 2008 at 14:50 UTC
|
I came up with a poor 257, but it scrolls realistically...
Oh well.
$d=10;$c;for(1..$d){$c=$c.int(rand(10));}print"$c\n";$g;$w='';$m=280;$
+t=$m;$|=1;do{$g='';for(1..$d){$g=$g.int(rand(10));}print"$w$g\r";if(s
+ubstr($g,0,1)eq substr($c,0,1)){if($t>0){$t--;}else{$w=$w.substr($c,0
+,1);substr($c,0,1)='';$d=$d- 1;$t=$m;}}}until($d==0)
Update: Got some tips from Albannach and got down to 204, but I'm spending characters for nice appearance:
$d=shift;for(1..$d){$c.=int(rand(10))}$t=$m=320;$|=1;while($d){$g='';f
+or(1..$d){$g.=int(rand(10))}print"$w$g\r";if(substr($g,0,1)eq substr(
+$c,0,1)){if($t){$t--;}else{$w.=substr($c,0,1,'');$d--;$t=$m;}}}
| [reply] [d/l] [select] |
Re: Golf: Movie style code cracker.
by betterworld (Curate) on Sep 14, 2008 at 19:34 UTC
|
108 characters:
$_=1x($l=pop);for$i(0..$l-1){($_=reverse)++for substr$_,$i;s/(.{$l}).+
+/$1/;print"\r$_";1e-5<rand&&redo}
This runs about 4 minutes for a 10 digit code. Change 1e-5 to 1e-4 if you want it to finish in 25 seconds.
Actually you can replace ($_=reverse)++ with $_++, which would reduce the length to 93 characters, but then the first digits will spin awfully slow (for a 10 digit code), and they will probably end up as ones.
Update: Adopted the required counting method, thus I have 108 characters, not 103.
Update 2: New version with 71 characters (however it would be a few (about 4) characters more if I hadn't copied a trick from BrowserUk; I'll elaborate in the spoiler tag):
-l15e'print|substr$_||=1x($l=pop),~rand$l,1,$A%10 while++$A%1e6||--$l'
(I must admit that I would probably not have figured out passing 15 to "-l" myself, but I saw that in BrowserUk's solution in this thread (while reading the spoiler in order to understand the counting)).
Caveat: The second version will probably not terminate for a 1-digit code.
Update 3: :-( I just noticed that my 71 character solution has the problem that it always prints "8" as the last digit. For the moment, I offer the following fix, which makes it 75 characters long (and I'll omit the spoiler tags as the contest seems to be over):
-l15e'print|substr$_||=1x($l=pop),~rand$l,1,~~rand 10 while++$A%1e6||-
+-$l'
(And you can modify the 1e6 constant to shorten the runtime.) | [reply] [d/l] [select] |
|
Update: I was too quick in awarding you the prize :( The code is not chosen fairly!
For a code length of 3, the chosen code will rarely contain a digit < 7. For a code length of 4, it will rarely contain a digit < 6; and so on.
It's not until you get to a code length 10, that all the digits are possible, even then (on the basis of quick tests), the higher digits will dominate choices. I don't think this is true for any other submission, though I cannot say I have checked them all scrupiously.
I declare your second attempt the winner beating my attempt by 6, and being eligable for the bonus of 10 for running for a tension building amount of time.
Originally, the 'bonus' was conceived as a 'penalty' (hence the +10 in a competition that is smallest wins), intended to penalise horribly slow solutions. But as everybody took it as a requirement to slow things down, and that actually turned out to be the harder (more stroke costly) thing to achieve, I let the misunderstanding stand.
Hence, I think your second attempt has a logical score of 61, though maybe you should take a penalty for never terminating for a code length 1? Others will have to decide that. In any case, well done++
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
|
For a code length of 3, the chosen code will rarely contain a digit < 7. For a code length of 4, it will rarely contain a digit < 6; and so on.
Unfortunately I've just noticed a problem myself, please see my third update above. (I've written it after I have read your note, before I've read your update.)
I think that the third attempt also fixes the problems that you describe.
I seem to have payed too little attention to the output, especially for small codes, because the ensuing command prompt always hides the output (because \r sets the cursor to the beginning of the line). Placing an "; echo" after the command in a unix shell helps with this issue.
| [reply] |
|
| [reply] |
|
Re: Golf: Movie style code cracker.
by Jenda (Abbot) on Sep 14, 2008 at 01:58 UTC
|
114 including space, one letter script name, space and the parameter 10:
$"='';$|=@C=map{int rand 10}1..pop;while(@C){@X=map{int rand 10}@C;pri
+nt"@F@X\r";push@F,pop@C if$C[0]eq$X[0]}
It scrolls very fast on my comp.
Update: 109 using Kyle's idea.
sub r{map{int rand 10}@_}$"='';$|=@!=r 1..pop;while(@!){@X=r@!;print"@
+F@X\r";push@F,pop@!if$![0]eq$X[0]}
Unlike some other solutions, these two work for much longer codes.
| [reply] [d/l] [select] |
|
| [reply] |
Re: Golf: Movie style code cracker.
by Anonymous Monk on Sep 13, 2008 at 10:29 UTC
|
What is the range (0 .. ???-1) ? | [reply] |
|
This (from the OP):
So, supplied with a command line argument, D, indicating the number of (numeric) digits, code a routine that picks (fairly) a random code, C, in the range 0 .. 1eD -1,
Means that if the command line argument (D) is 4, then the range is 0 .. 1e4-1. Ie 0 .. 9999
For D = 10, then the range is 0 .. 1e10 -1. Ie. 0 .. 9999999999
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
|
Thanks. In the op you have d not D, so it confused.
| [reply] |
|
Re: Golf: Movie style code cracker.
by repellent (Priest) on Sep 14, 2008 at 02:16 UTC
|
Here's my entry at 105 characters:
-l15e'split//,int rand 10**pop;print$a,map{(0..$_-1,$_+1..9)[rand 9]}@
+_ while++$i%4e4||@_&&($a.=shift@_)'
A check for correctness would be to print out each sequence on its own line and look for a triangle effect:
axxxx
axxxx
axxxx
1bxxx
1bxxx
1bxxx
12cxx
12cxx
12cxx
123dx
123dx
123dx
1234e
1234e
1234e
12345
12345
where a != 1, b != 2, c != 3, d != 4, e != 5
x = can be any digit
| [reply] [d/l] [select] |
|
A problem is that this always produces the same code: 4294967295?
Which would be good for movie continuity I suppose, but the nerds would pick up on the number and complain bitterly :)
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
|
Works for me. The inconsistency is most probably caused by non-portable code:
(~0 & $a) != int($a)
Fine! I've updated my entry by one extra character :)
| [reply] [d/l] |
|
Re: Golf: Movie style code cracker.
by betterworld (Curate) on Sep 14, 2008 at 15:44 UTC
|
code a routine that picks (fairly) a random code, C, in the range 0 .. 1eD -1, and then scrolls the display (sequentially or randomly), until the first digit (left most) matches the first digit of C.
Does this mean that the implementation must actually choose C before displaying it digit by digit? Or would it (theoretically) be okay if the digits were chosen as they are being displayed (i.e. the second digit is not known to the program before the first has been shown)?
| [reply] |
|
#! perl -slw
use strict;
$|++;
sub r{int rand pop}
my $n = pop;
my @c = map int rand 10,1..$n;
my @x = (0) x $n;
for my $d ( 0 .. $n -1 ){
map{
$x[ $d + r( $n - $d ) ] = r( 10 );
printf "\r@x";
$x[ $d ] = $c[ $d ]
}1..1e5
}
I then started golfing and here are the steps I went through:
-e"sub r{int rand(pop||10)};@c=map{r}1..($n=pop);for$d(0..$n-1){map{$x
+[$d+r($n-$d)]=r,print qq[@x\r]}1..1e5;$x[$d]=$c[$d]}"
-e"sub r{int rand(pop||10)};$n=pop;@c=map{r}1..$n;for$d(0..$n-1){map{$
+x[$d+r($n-$d)]=r,print qq[@x\r]}1..1e5;$x[$d]=$c[$d]}"
-e"$n=pop;for$d(0..$n-1){map{$x[$d+rand($n-$d)]=int(rand 10),print qq[
+@x\r]}1..1e5;}"
-e"for$d(0..($n=pop)-1){map{$x[$d+rand($n-$d)]=int(rand 10),print qq[@
+x\r]}1..1e5}"
-l15e"for$d(0..($n=pop)-1){map{$x[$d+rand($n-$d)]=int(rand 10),print @
+x}1..1e5}"
-l15e"for$d(0..($n=pop)-1){$x[$d+rand($n-$d)]=int(rand 10),print@x,for
++1..1e5}"
-l15e"for$d(0..($n=pop)-1){$x[$d+rand($n-$d)]=rand(10)&15,print@x,for+
+1..1e5}"
-l15e"for$d(0..($n=pop)-1){$x[$d+rand$n-$d]=rand(10)&15,print@x,for+1.
+.1e5}"
At the transition from step 2 to step 3, I notice that I had these 3 pieces of code:
- @c=map{r}1..$n;
Put random digits into @c.
- $x[$d+r($n-$d)]=r
put a random digits into $x[...].
- $x[$d]=$c[$d]
replace the random digit in @x with corresponding (random digit) from @c.
Which is equivalent to $tmp = val; $target = other value; $target = $tmp.
Eliminating the temporary value and intermediate steps is the essence of golf, so I conclude that step 3 above is logically equivalent to step 2. Others may wish they had thought of it...or condemn it as a step too far?
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |
Re: Golf: Movie style code cracker.
by ambrus (Abbot) on Sep 15, 2008 at 06:17 UTC
|
Do you measure the 2.5 minutes in a slow terminal like gnome-terminal (with an xft font) or a really fast one like linux console in text mode? For some reason I think the speed of printing the numbers will take the most time in this golf.
| [reply] |
|
| [reply] |
|
|