# All Questions

10,799 questions
Filter by
Sorted by
Tagged with
2k views

### Using two linked programs, output ordinal numbers up to n

...Ordinal numbers (or ordinal numerals) are words representing position or rank in a sequential order. From Wikipedia. Your task is, using 2 separate programs (of which can be made from 2 different ...
3k views

### Construct a pentagon avoiding compass use

Rules You will start with only two elements: Points $A$ and $B$ such that $A \neq B$. These points occupy a plane that is infinite in all directions. At any step in the process you may do any ...
6k views

### Too many spies!

You are fighting an extensive network of enemy spies. You know that each spy has at least one (sometimes multiple) fake identities they like to use. You'd really like to know how many spies you're ...
448 views

### How long's left?

How long's left? Recently, I was making pizza using a 5-minute timer on my phone. When someone walked in and asked me how long was left, I was confused for a moment at first as to how to answer the ...
416 views

### Find X,Y,Z coordinates from index

Introduction I began studying the Collatz Conjecture And noticed these patterns; 0,1,2,2,3,3...A055086, and 0,1,2,0,3,1...A082375, in the numbers that go to 1 in one odd step, 5,10,20,21,40,42......
303 views

### Find the hardest OEIS sequence to golf!

Notice: This question originally had people write comments with a shorter program, rather than new answers. This has been changed so that people with shorter programs can get reputation too. Hopefully ...
1k views

### There's an echo in my array… echo in my array… my array

Help! I seem to have an annoying echo in some of my arrays, and I'd like to get rid of it. When this occurs, the original array repeats itself somewhere in the middle causing the values to be added ...
184 views

### Compute my Sacred Geometry [closed]

In the tabletop RPG named Pathfinder, there is a feat that characters can take called Sacred Geometry, which allows a character who has it to buff their spells in exchange for doing some math: to use ...
3k views

### Matchmaker, Matchmaker, make me a match

(we won't be finding a Find or catching a tryCatch, though) This is part two of a multi-part series of implementing some ...
368 views

### Reverse your code, reverse the OEIS

The task here is to write a program that takes an natural number, $n$, and produces the $n$th term of an OEIS sequence. That sequence should have an identifier in the form of ...
3k views

### Robbers: The Hidden OEIS Substring

This is a Cops and Robbers challenge. This is the robber's thread. The cop's thread is here. The cops will pick any sequence from the OEIS, and write a program p that prints the first integer from ...
4k views

### Cops: The Hidden OEIS Substring

This is a Cops and Robbers challenge. This is the cop's thread. The robber's thread is here. As a cop, you must pick any sequence from the OEIS, and write a program p that prints the first integer ...
630 views

### Jimmy needs a new pair of shoes!

Jimmy has had a busy last week with all these platforms and ropes, and poor Jimmy doesn't even have legs or feet to stand on! Your job is to take a string containing multiple Jimmys and give them ...
877 views

### Bentley's coding challenge: k most frequent words

This is perhaps one of the classical coding challenges that got some resonance in 1986, when columnist Jon Bentley asked Donald Knuth to write a program that would find k most frequent words in a file....
175 views

### Tips for golfing in Grass

What general tips do you have for golfing in Grass? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Grass (e.g. "remove no-op ...
3k views

### Do you know your 'KVZ's?

Concept In what ways can you scramble the English alphabet so that it can still be sung to the tune Twinkle Twinkle Little Star without ruining the tune? Rules Swapping Let's just assume the ...
67 views

### Mutation chain generator [duplicate]

Given a start word and a target word, print the "mutation chain" that starts at the start word and ends at the target word. You may assume both words are lowercase and only have alphabetic characters....
1k views

### String to Bit Transition

Task Given an input string of one or more ASCII characters which codepoints are between 0 and 128 (exclusive), do the following: Convert each character into its 7-bit ASCII code (if the ASCII code ...
967 views

### Fivenum and a little bit

(a paradox, a paradox, a most ingenious paradox) This is the first part of a multipart series inspired by different R functions. The Task Given a dataset $D$ of positive integers, I need you to ...
10k views

### Print the last, middle and first character of your code

The challenge is simple: Print the last, middle, and first character of your program's source code, in that order. The middle character is defined as follows, assuming a source length of ...
252 views

### Multiplication in Brainfuck - minimum number of evaluations [closed]

Given two numbers in tape location #0 and tape location #1 in Brainfuck, compute their product into another tape location (specify with answer). Optimize for the least amount of time-units used, where ...
192 views

### Reverse Cat Programme [duplicate]

Simple problem, create a programme that takes one input, and the outputs that input in reverse. Some test cases are [input -> output]: ...
3k views

### Shortest hex dumping program

Challenge Write a console program to display every byte of a file in hexadecimal (0-9  ...
103 views

### One square root function for unsigned numbers [closed]

One square root function for unsigned numbers Write the function sqrti(x) that from one not negative integer number x, it returns the integer square root of that number truncate to the 0 digit, so ...
6k views

### Integer Lists of Noah

Introduction: I think we've all heard of it, but here a very brief summary: Noah gathered two of every species of animal on the planet, male and female, to save in his Ark during a great flood. The ...
220 views

### Find all a, b, c, d, e, such that a + b + c + d + e = 1000 with no more than 3 loops [closed]

The rule is: a, b, c, d, e is an integer from 0 to 1000, no relation between ...
96 views

### Total time to deteriorate all shielded cells [closed]

Problem: We have a two dimensional matrix of positive integer cells. On each turn any non-zero cell with a neighbor (top/bottom/left/right) of zero decreases by 1. We want count to the number of non-...
98 views

### Make a slow monotonic injection [duplicate]

In 256 bytes or fewer write a function, $f$, from the positive integers to the positive integers that is: Monotonic: larger inputs always map to larger outputs. ($a < b \implies f(a) < f(b)$...
6k views

Challenge Description: Write a program that asks the user for input. The user will enter Good or Bad. You do not have to ...
115 views

### Sum of multiples of powers of ten of an integer [duplicate]

Write a function to produce, for a non-negative integer, a string containing a sum of terms according to the following: ...
444 views

### Counting generalized polyominoes

This challenge will have you count pseudo-polyforms on the snub square tiling. I think that this sequence does not yet exist on the OEIS, so this challenge exists to compute as many terms as possible ...
7k views

### Can Jimmy hang on his rope?

Yet another Jimmy challenge by his original father. See these other lovely challenges. As you all know, recently we've been seeing challenges related to Jimmy on platforms. Now, Jimmy is an acrobat ...
100 views

### Geiger counter prime generation [closed]

This challenge is quite simple to conceptualise, but likely a lot harder to execute. In this challenge, the program will have to detect the number N of its characters that have been randomly changed (...
1k views

It seems as of recent, there have been a lot a Jimmys falling to their death, as can be seen here, and here where you were asked to determine if Jimmy would fall. It is time we put a stop to this ...
1k views

### Tesco's Burger Relish Best Before End date number

Given a date between 2010-01-01 and 2099-12-31 as three integers (please state your order if not [year,month,day]), answer with Tesco's corresponding five-digit ...
911 views

### Alice's First Code Review

Alice is an intern in a company that uses Brainfuck as a primary language for both client-side and server-side development. Alice just has written her first code and she's a bit nervous as she's ...
700 views

This challenge is about Haskell point-free style polynomial functions. Although you don't need to know Haskell language to do this challenge, Haskellers might have an advantage here. Point-free ...
194 views

### Feliz navidad prospero año [duplicate]

UP So christmasSSSSSS is coming and carols are on the radio all day. Jose Feliciano's Feliz Navidad song is a good example of this. Your task is to print the entire (and repetitive) song. Lyriiiiiics:...
405 views

### Can the cursor reach the bottom?

In a matrix of characters, a cursor is a movable position between two adjacent characters, before the first character or after the last character in a line, like that "I"-shaped indicator which moves ...
5k views

### Write a function [closed]

I honestly can't believe this challenge does not already exist. The challenge Write a function. The specifics Your program must define some sort of callable function. This includes anything ...
5k views

### How many Jimmys can fit?

In this simple but fun challenge, you were asked to determine if Jimmy would fall of their platform. Jimmy has three body parts /, ...
329 views

### Print the previous answer in reverse - with a catch (pt. 2)

Your challenge is very simple: output the previous answer, in reverse. However, as with this similarly-titled question, there's a catch: in this case, you cannot use characters from the answer before ...
313 views

### Print the previous answer in reverse - with a catch [duplicate]

Your challenge is very simple: output the previous answer, in reverse. However, as with this similarly-titled question, there's a catch: in this case, you can only use characters from the answer ...
831 views

### Multi-user CRUD: Valid, Problem, or Error?

Introduction: Ever used Dropbox with some other people and you both modified the same file? Ever had a multi-user application with a relational database, and two people were modifying (or worse, one ...
1k views

### n-level Ouroboros Quine

This 128-language quine ouroboros (a program which outputs a program in another language, which outputs a program in yet another language, (125 languages later), which outputs the original program) is ...
229 views

### Smallest web server [closed]

Create your smallest web server in your preferred language! Requirements Must respond to atleast 1 type of request (get,post,patch,delete), with a specified string. Smallest implementation wins! *...
9k views

### Will Jimmy fall off his platform?

Backstory Meet my friend Jimmy: /o\ Jimmy is a little character who likes to stand on platforms. Here's Jimmy safely standing on a platform: ...
108 views

### Report divisibility with arithmetic integer operations only [closed]

Given two numbers, the first is greater than the second, check whether the first number is divisible by the second without a remainder. If divisible, answer "yes"(...