Minkolang 0.14, 46 bytes
I'm sure this could be golfed, but it's 4 am here and I need to go to bed.
n$z"/\"z$D$OlOz[" /"zi-$Dlr$d"\"zi1+-3&5$X$O].
Try it here.
Explanation
n$z Take number from input (n) and store it in the register (z)
"/\" Push these characters (...
It tends to be shorter for "find the Nth..." to nest the g loop inside a {}*. There's also nothing wrong with adding all Hilbert numbers to L instead of just the primes. 5ri{_L+:L;{4+_Lf%0&}g}* — Martin Büttner ♦10 mins ago
The question is
One of our agents recently caught a young hacker with the code name !$criptkiddie. He hid the below piece of javascript on a page which calculates a value but doesn't output the final result. It's also embedded on this page - can you find the result?
I need the code please..
va...
The game of Sevens is played as follows: n players sit in a circle, and start counting up from 1, passing to the left (or from player A to player B).
When a number p that has a 7 in it OR is divisible by 7 is reached, then the player who spoke the number p-1, after the next player says p, must s...
Sometimes when writing brainfuck code, you feel the need to make it longer than needed to encourage debugging. You could do it by just plopping a >< in there, but what fun is that? You'll need something longer and less NOPey to confuse anybody reading your code.
A brainfuck NOP is a sequence of ...
Bacon's cipher
This little piggy went to market, this little piggy wrote some code...
Ah wait, we're not talking about that bacon, we're talking about Sir Francis Bacon! Specifically, the cipher Bacon devised in 1605.
The cipher works by concealing the message in the presentation of text, rat...
The Dal Segno and Da Capo are two very commonly used musical terms. They mean "from the sign" (𝄋) and "from the beginning" respectively.
There is also the idea of the coda (𝄌), which is the very end of a piece of music. It's what's played after the "main section" of the piece.
A D.S. al coda ...
Converging Sums of a Fractal Sequence
code-golf number sequence number-theory fractal
Background
I've been looking into some fractal sequences recently. Those are integer sequences which contain themselves as proper subsequences. Commonly, you can remove the first occurrence of every integer a...
Bacon's cipher
This little piggy went to market, this little piggy wrote some code...
Ah wait, we're not talking about that bacon, we're talking about Sir Francis Bacon! Specifically, the cipher Bacon devised in the late 1500s.
The cipher works by concealing the message in the presentation of...
Write a programs that reads the file Smart.txt & outputs the order from Most Smart to Least smart.
--Smart.txt
Sam John
John Michael
Taylor Sam
In the above text file the person on the left is smarter than the person on the right. So we have to finally print the output as follows:
Taylor Sam ...
Can any one help me in below script if player hits strike script wants to display the X if spare / such that the consecutive frame score should be increased based on the bowling game rules.for this script it will just appends the consecutive frame scores(with out following the game rules).
re...
It's OK, we have some weird ones here, too. Like parts of Indiana and Arizona don't follow Daylight Saving Time rules, so for half the year part of the state is on a different time than the rest of the state.
The Asian Highway (AH) project, also known as the Great Asian Highway, is a cooperative project among countries in Asia and Europe and the United Nations Economic and Social Commission for Asia and the Pacific (ESCAP), to improve the highway systems in Asia. It is one of the three pillars of the Asian Land Transport Infrastructure Development (ALTID) project, endorsed by the ESCAP commission at its 48th session in 1992, comprising Asian Highway, Trans-Asian Railway (TAR) and facilitation of land transport projects.
Agreements have been signed by 32 countries to allow the highway to cross th...
Like the fact that Anne Frank and Martin Luther King, Jr. were born in the same year, but my brain somehow interprets them as two completely different time periods.
The game of Sevens is played as follows: n players sit in a circle, and start counting up from 1, passing to the left (or from player A to player B).
When a number p that has a 7 in it OR is divisible by 7 is reached, then the player who spoke the number p-1, after the next player says p, must s...
@Zgarb I've heard you know your way around functional programming, would you be willing to discuss a functional esolang I want to design over at the esolang chatroom?
Digit Sum of a Number
Write a program that calculates the digit sum of a non-negative integer, in as few bytes as possible. Digit sum means the sum of every single digit.
Test cases:
Input:
10
Output:
1
Input:
3701
Output:
11
Rules:
Your program must log to STDOUT or an acceptabl...
The Catalan numbers are a sequence of natural numbers often appearing in combinatorics. The nth Catalan number (for n >= 0) is defined as:
Challenge
Write a full program that takes a natural number n via STDIN or an acceptable alternative, and outputs the nth Catalan number. You may assume th...
@Stefnotch I'll have another look later, but I'm starting to dislike calling them catalogues... it seems to be achieving the exact opposite of my original intention.
The Catalan numbers are a sequence of natural numbers often appearing in combinatorics. The nth Catalan number (for n >= 0) is defined as:
Challenge
Write a full program that takes a natural number n via STDIN or an acceptable alternative, and outputs the nth Catalan number. You may assume th...
@Stefnotch no name at all. just make it a code golf, don't accept answer and allow newer languages. my original intention was showing that a) simple tasks can make interesting challenges if they are properly specified and people try to answer them in languages where they are not all that simple and b) challenges still work if we lift the language-must-have-existed-before requirement and focus on competition within each language instead.
but the general impression people get seems to be that all of that catalogues have some sort of special status, and that all of those things are only allowed (and only make sense) for a catalogue
@quartata I actually have Chris's permission to redo the Fibonacci challenge with a spec that is up to today's standards (and he would even manually migrate all answers that are still valid under the new rules), but because of all I've just said I've been a bit hesitant about that.