# Search Results

Results tagged with
Search options not deleted user 54071
7 results

A competition to solve a particular problem through the usage and manipulation of numbers.

### Find the minimum and maximum integers in an array, without using builtins

dc, 110 bytes ?ddsMsmzdsAsa[z1-:az0<S]dsSx[>R]s?[la;asM]sR[lM]sQ[lQxla1-dsa;al?xla0<N]dsNxlAsa[<R]s?[la;asm]sR[lm]sQlNxlmlMf Help me, dcers! You are my only hope! Thanks to @seshoumara for finding …
• 983
1 vote

### Generate The SUDSI Sequence

dc, 134 132 131 bytes [_1*]sOdsn2*ddslsSsa[ladd:S1-dsa0<P]dsPx1d0rsN:N[la1+dsad;SdS@r1+;SdS@rL@L@r+Ss-d0>Od;SrLsdSsrLs;Sr:S:S1;SladsN:Nlaln>G]dsGxln1-;Nf Use echo $n$code | dc, where $n is n and$ …
• 983

### Alternating Sign Sequence

GeoGebra, 44 bytes Element[Flatten[Sequence[{t,0,-t},t,1,n]],n] where n is one-indexed. Explanation: Element[ , n] # Return the nth element of the list . Fl …
• 983

### Calculate the sum of ILD

r # Rotate: move remaining digits to top of stack dsa # Store a copy of the remaining digits in a' Z 1<A # Count the number of digits left; if more than 1, execute A ]sA # Store the … function as A' d sa # Store a copy of the input in `a' # Props to you if you're still reading this Z 1<A # Count the number of digits left; if more than 1, execute A la # Load …
• 983

### Fibonacci function or sequence

C++, 42 bytes I haven't read every solution in this challenge, but the leaderboard doesn't have a C++ solution, which is a travesty. int f(int i){return i-->1?f(i)+f(i-1):!i;}
• 983
1 vote

### Print all integers

stack and newline without popping) c # Clear stack [ # Open macro definition z # Push stack depth (1 on first iteration, because this macro is on the stack) p # Peek (print positive number … ) 0r- # Subtract ToS from 0 (make negative) p # Peek (print negative number) rdx # Rotate (move this macro on top of the negative number), duplicate, and execute ]dx # Duplicate string and …
• 983