All Questions

Filter by
Sorted by
Tagged with
19
votes
6answers
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 ...
37
votes
3answers
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 ...
38
votes
13answers
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 ...
21
votes
5answers
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 ...
5
votes
4answers
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......
-6
votes
3answers
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 ...
28
votes
10answers
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 ...
8
votes
1answer
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 ...
21
votes
17answers
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 ...
11
votes
5answers
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 ...
23
votes
24answers
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 ...
37
votes
27answers
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 ...
11
votes
8answers
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 ...
16
votes
9answers
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....
4
votes
3answers
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 ...
23
votes
14answers
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 ...
2
votes
0answers
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....
9
votes
28answers
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 ...
14
votes
9answers
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 ...
59
votes
94answers
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 ...
3
votes
1answer
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 ...
1
vote
14answers
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]: ...
11
votes
24answers
3k views

Shortest hex dumping program

Challenge Write a console program to display every byte of a file in hexadecimal (0-9  ...
-4
votes
4answers
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 ...
26
votes
55answers
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 ...
-1
votes
3answers
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 ...
1
vote
0answers
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-...
4
votes
0answers
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)\$...
10
votes
55answers
6k views

Swapping “Good” and “Bad”

Challenge Description: Write a program that asks the user for input. The user will enter Good or Bad. You do not have to ...
2
votes
3answers
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: ...
11
votes
2answers
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 ...
17
votes
23answers
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 ...
-4
votes
3answers
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 (...
16
votes
8answers
1k views

Jimmy needs your help!

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 ...
7
votes
17answers
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 ...
20
votes
8answers
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 ...
3
votes
2answers
700 views

Point-free madness

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 ...
-4
votes
2answers
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:...
5
votes
2answers
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 ...
16
votes
62answers
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 ...
28
votes
13answers
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 /, ...
5
votes
7answers
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 ...
1
vote
3answers
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 ...
10
votes
3answers
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 ...
10
votes
9answers
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 ...
-3
votes
2answers
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! *...
28
votes
41answers
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: ...
-5
votes
5answers
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"(...
67
votes
4answers
8k views

Machine Learning Golf: Multiplication

I'd like to propose a different kind of golfing challenge to this community: (Artificial) Neural Networks are very popular machine learning models that can be designed and trained to approximate any ...
-6
votes
4answers
179 views

Is this number a palindrome? [closed]

Input A single integer in your language's preferred format. This format is non-negotiable (no input as strings, arrays of digits, etc.), but standard I/O formats do apply if otherwise it would be ...

15 30 50 per page