Linked Questions

30 votes
4 answers
3k views

Orientation Oriented Programming

Write a program for a specific language that in different orientations performs different tasks. Your code should have at least two non-empty lines and at least two non-empty columns and should ...
Dom Hastings's user avatar
  • 23.8k
26 votes
10 answers
2k views

The Solitude of Prime Numbers

Recently I read the novel "The Solitude of Prime Numbers" where the main characters are somewhat compared to twin prime numbers ("always together, but never touching"). A twin ...
Mario's user avatar
  • 3,091
20 votes
11 answers
778 views

Implement bag operations

A bag, also called a multiset, is an unordered collection. You can call it a set that allows duplicates, or a list (or an array) that is not ordered/indexed. In this challenge, you are asked to ...
busukxuan's user avatar
  • 2,808
11 votes
18 answers
1k views

Do we share the prime cluster?

The prime cluster of an integer N higher than 2 is defined as the pair formed by the highest prime strictly lower than N and the lowest prime strictly higher than N. Note that following the definition ...
Mr. Xcoder's user avatar
  • 42.4k
17 votes
14 answers
3k views

I want 8 bits for every character!

This is the reverse of this challenge. Given an encoded list of codepoints and the characters used to encode it, you need to decompress it to its original string. For example, given the encoded list <...
naffetS's user avatar
  • 12.5k
5 votes
17 answers
894 views

Convert a decimal integer to binary only using arithmetic operators

There are 10 types of people in the world, those who understand binary and those who do not. Where are you? Let's see! Challenge Your task is to convert a decimal integer to binary, only using a ...
Wasif's user avatar
  • 12.3k
23 votes
12 answers
1k views

Reverse and add degeneracy

Intro Reverse and add is as simple as it sounds, take n and add it to its digits in reverse order. (e.g. 234 + 432 = 666). If you apply this process repeatedly ...
Wheat Wizard's user avatar
  • 98.8k
25 votes
5 answers
1k views

Parse a two-dimensional syntax

Background Alice and Bob are creating a golfing language to win every single PPCG challenge. Alice wants to make a two-dimensional language, like ><>, but Bob prefers a prefix-infix syntax like in ...
Zgarb's user avatar
  • 42.7k
27 votes
3 answers
3k views

A regex to match three consecutive integers iff the third integer is the sum of the first two

Write a regular expression which matches a given string consisting of three non-negative, space-separated integers if and only if the last integer is the sum of the previous two. Answers may be for ...
Josh Withee's user avatar
38 votes
3 answers
1k views

Build a golfing language with me

A lot of PPCG users helped with the creation of this challenge, both in chat and the Sandbox, specifically Martin Ender, AdmBorkBork, Emigna and user202729 Our community has found it necessary to ...
caird coinheringaahin g's user avatar
9 votes
3 answers
2k views

GolfScript, CJam, or Pyth? [duplicate]

Which language usually produces shorter golfed code: Pyth, CJam or Golfscript? In asking this, I do not mean which has a prettier syntax or which has the most useful commands, I mean overall, which ...
Nico A's user avatar
  • 2,530
10 votes
12 answers
991 views

Generating Fermat primes

Given a number n, print the nth prime Fermat number, where the Fermat numbers are of the form 22k+1. This code should theoretically work for any n (i.e. don't hardcode it), although it is not expected ...
poi830's user avatar
  • 1,303
14 votes
4 answers
606 views

The Most Wanted Prime Numbers

Output a sequence of all the primes that are of the following form: 123...91011...(n-1)n(n-1)..11109...321. That is, ascending decimal numbers up to some ...
AnttiP's user avatar
  • 7,898
15 votes
4 answers
433 views

Counting Abelian groups of a given size

Background Last time, we counted groups of a given size, which is a non-trivial problem. This time, we'll only count Abelian groups, i.e., groups with a commutative operation. Formally, a group (G, ∗) ...
Dennis's user avatar
  • 210k
24 votes
3 answers
527 views

Peel the potato

This is a potato: @@ @@@@ @@@@@@ @@@@@@ @@@@ @@ More generally, a size N potato is defined as the following shape: If N is even, it is 2 centered ...
VarmirGadkin's user avatar

15 30 50 per page