Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
A competition to solve a particular problem through the usage and manipulation of numbers.
0
votes
Is it a balanced number?
Tcl, 156 bytes
proc R n {set l [string le $n];puts [expr [join [split [string ra $n 0 [expr $l/2-($l%2==0)]] {}] +]==[join [split [string ra $n [expr $l/2] $l+$l] {}] +]]}
Try it online!
0
votes
Count Like a Babylonian
Tcl, 134 bytes
proc B l {regsub {\\} $l 0 l
lmap c [lreverse $l] {incr s [expr 60**([incr i]-1)*([regexp -all < $c]*10+[regexp -all T $c])]}
expr $s}
Try it online!
In the reversed list, I loop in …
1
vote
"Graphing" calculator
Forth (gforth), 35 bytes
: a 0 DO 2DUP OVER I * + + . LOOP ;
Try it online!
Just works with integers, not with floats. Modifies global integer stack state.
1
vote
It was just a bug
Tcl, 99 bytes
time {incr i;time {puts -nonewline [incr j][string repe " " [expr abs(9-$i)]]} 9;puts 0;unset j} 17
Try it online!
1
vote
Print all integers
Forth (gforth), 29 bytes
: w 0 1 DO I 1 I - . . LOOP ;
Try it online!
1
vote
Construct a uInt from an array of bits
Forth (gforth), 55 bytes
: a 2 BASE ! DEPTH 1 +DO SWAP I LSHIFT + LOOP DECIMAL ;
Try it online!
Assuming we start with DECIMAL base and return to it.