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.
1
vote
Rotate a number
Golfscript - 28 bytes
~:a;`{1/)\+}a*1/{(~:b!}do b\
input: 10450 4
output: 4501
Try it online!
Explanation
~:a;` # Parses the input "123 3" -> "123" on stack and a = 3
{ …
1
vote
The lowest initial numbers in a Fibonacci-like sequence
GolfScript - 88 77 bytes
~:N[,{1+:a,{[.;a]}/}/][{[.~{.N<}{.@+}while\;N=]}/]{)1=\;},{(\;~+}$(\;);~~' '\
I did not check for multiple solutions, thanks to cardboard_box!
Explanation
~:N …
1
vote
Simple integer operation calculator
GolfScript - 45 bytes
{1+}:"+";{1-}:"-";{2/}:"/";{2*}:"*";0\1/{`~}/
Explanation
{1+}:"+"; # Creates aliases for operators
{1-}:"-";
{2/}:"/";
{2*}:"*";
0\1/ # Pushes 0 and splits the string in …