1
vote
0answers
28 views

Draw centered polygonal numbers

A centered polygonal number is able to be put into an arrangement of multiple concentric polygons, each with a side length of one more than the inner one. For example (image from linked page), the ...
9
votes
14answers
640 views

Rosetta Stone Challenge: What's Average Anyways?

The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism! The Challenge When people use the term "average," they ...
10
votes
2answers
304 views

Decompose words into other words (e.g., “afterglow” = “aft” + “erg” + “low”)

Here's one for all you wordsmiths out there! Write a program or function which takes a list of words and produces a list of all possible concatenative decompositions for each word. For example: ...
14
votes
3answers
463 views

Multiply with restricted operations

Goal Your goal is to multiply two numbers using only a very limited set of arithmetic operations and variable assignment. Addition x,y -> x+y Reciprocal x -> 1/x (not division x,y -> ...
5
votes
8answers
1k views

Extraction of Bits

Your task is to devise a programme that extracts the bits, in order, represented by the first argument based on the set bits represented by the second argument (the mask). Formal Definition: Let ...
18
votes
1answer
489 views

Voice recognition: “Yes” or “No”?

Task Implement a program in minimum bytes of source or binary code that does voice recognition of a voice sample (me saying "yes", "yeah" or "no" in voice or in whisper, plainly or quirkily) based on ...
9
votes
3answers
323 views

SPOF Picture Hanging

Objective I have a nice picture that I want to hang on my wall. And I want it to hang there in a spectacular way, so I chose to hang it on n nails where n is any positive integer. But I'm also ...
13
votes
7answers
820 views

Two-Many Outputs

The Challenge I present to you another spy vs. spy challenge pitting obfuscators versus crackers. In this case, however, the datum to be protected is not an input but an output. The rules of the ...
16
votes
26answers
2k views

Multiply all numbers in a string

Your goal is to find all numbers in a string, and multiply each one individually by a value input by the user You will not need to worry about decimals The user will input a number and a string The ...
-1
votes
0answers
43 views

A Haskell operator that can access a multi-dimensional list by supplying a list of indices [on hold]

It should work similarly to the standard subscript operator (except it takes a list of indices), and should be able to do the following: [1] !!! [1,2,3] = 2 [1,2] !!! [[1,2,3],[4,5,6],[7,8,9]] = 6 and ...
-3
votes
2answers
143 views

A Decent Decade [on hold]

This is a short one: Only once in American history has there been a decade in which four of the years were prime numbers. Your program has to output the decade after 1776 where four its years ...
18
votes
6answers
1k views

Take a break to make a snake!

Our classic snake has developed an inbalance of growth hormones. To make matters worse, his tail is frozen in place! Given directional input as specified in Figure 1, write a program to determine ...
-4
votes
2answers
181 views

programmers from all languages, write this with as few code as possible

i've been dabbling with a hypothetical language... now, i want to add a feature/mechanism that can easily format data in as few codes as possible. now, i need to compare my hypothetical language ...
-5
votes
0answers
62 views

What is the “best” solution of sudoku? [on hold]

Consider "points" of a sudoku solution is: where c[k] = sum of all abs[(xi - xj)(yi - yj)] such that the values of cell (xi, yi) and (xj, yj) are both equal to k. How many points can you get ?
8
votes
6answers
811 views

Implement an 8 bit adder

The Challenge Implement a function which accepts two integers whose values range from 0 - 255 and returns the sum of those integers mod 256. You may only use bitwise negation (~), bitwise or (|), bit ...
6
votes
6answers
720 views

Can you make my terminal less boring?

Terminals are so boring these days. They used to look like this: Now they're just bland and dull and black-and-white. I want you to write me a program that will make my terminal all colorful ...
-4
votes
0answers
46 views

Find if all brace pairs in an array of strings are correctly formatted [duplicate]

I created a fun challenge. I call this the BRACES Challenge. The rules are simple. Given an array of strings, find out if all brace pairs in each string are formatted correctly. braces: []{}() ...
-12
votes
0answers
77 views

Please solve the message puzzles [on hold]

Jack Sparrow sends a message to Captain Davy Jones, which was intercepted by the lovely Elizabeth Swann. The previous conversation contained the following text "et tu brute?" BNBLINISLINAL US ...
0
votes
0answers
95 views

Interpret FRACTRAN [on hold]

Edit: Duplicate of stackoverflow.com/questions/1749905/code-golf-fractran, please vote close. Goal Write a program or named function to interpret the esoteric programming language FRACTRAN. Use as ...
-5
votes
0answers
82 views

Write intentionally inefficient code [on hold]

Your task is to write code that is intentionally inefficient. Specifically, you must solve a problem of your choice so that your solution is many times slower than the best known solution. Your score ...
7
votes
1answer
283 views

PNG Pixel Forces

Challenge A Pixel World is a PNG image where gravitational, electromagnetic, and nuclear forces no longer exist. Special forces known as "pixel forces" are all that remain. We define this force as ...
12
votes
7answers
394 views

Find the maximum operation

The challenge is to find the maximum number you can get from a list of integer using basic arithmetic operators (addition, substraction, multiplication, unary negation) Input A list of integers ...
11
votes
8answers
2k views

These Primes of Mine Are Always Solid Lines

Let's create a N×N grid of spaces and underscores that can be used to visually determine if a number is prime. (N may be any positive integer.) This grid has three simple rules: The nth column ...
5
votes
3answers
399 views

Interpret /// (pronounced 'slashes')

Because we can't get enough of esoteric language golfs, can we? ///—pronounced slashes—is a fun little language based on the s/// regex-replacement function of Perl fame. It contains only ...
7
votes
3answers
540 views

BrainFlow Interpreter!

BrainFlow What is BrainFlow? BrainFlow is an extension of BrainF**k (BFk) with 3 additional commands for added functionality and confusion. What commands? In addition to the normal BFk commands, ...
24
votes
42answers
3k views

What's wrong with public variables?

Code Bots I hate private and protected variables. I just want to access anything and everything! If you are like me, then this challenge is for you! Write a bot that works together in harmony with ...
3
votes
2answers
404 views

Decipher a Code Stick

Introduction You're an American spy during the heat of the Cold War and you've managed to intercept a Russian message. Immediately you recognise it as a code stick cipher and wrap it around a pencil. ...
2
votes
2answers
242 views

Put together cut strips of paper to get original message

This question is from a programming challenge (not DARPA) which has ended. A sheet of paper consists of message, which has been shredded into vertical strips. Given the vertical strips and a ...
5
votes
4answers
459 views

Find a thumbnail in a mosaic

After the last Ludum Dare (LD) game programming contest a friend of mine made a nice mosaic of all the LD game thumbnails: After searching for my own game I quickly gave up and decided to solve it ...
8
votes
9answers
661 views

Multiply Quaternions

Write a named function or program that computes the quaternion product of two quaternions. Use as few bytes as possible. Quaternions Quaternions are an extension of the real numbers that further ...
-4
votes
0answers
122 views

Let's have some fun, create a program to display a random curse word [closed]

Your task is simple. Create a program that will display a random MILD curse word every time it is started, censored words are not allowed and do not count. Curse words should be mild enough to not be ...
41
votes
11answers
5k views
+200

mastermind horse battery staple

Objective Given a list of three-word passphrases, crack them all. Each time you guess, you will be given a clue in the style of Mastermind, depicting how many characters match the password, and how ...
14
votes
16answers
2k views

Find the closest palindromic number

Given a number N, output/return X so that N+X is a palindrome, where |X| has to be as small as possible. Palindrome: A number is a palindrome, if its sequence of digits is the same when reading them ...
12
votes
0answers
273 views

Life can be colorful! [duplicate]

Each cell in a life-like cellular automaton only needs one bit to represent it since it can only be alive or dead. That means there are only two colors; pretty boring. Normal images have 24 bits per ...
10
votes
3answers
508 views

Growing Manhattan Ameobas

An ameoba graph* is a type of tree whose nodes all have values from 0 to some non-negative integer N, and any particular node with value x < N connects to x+1 distinct nodes with values x+1. ...
2
votes
2answers
316 views

Memory leak, without any fork bombs or looping of any kind [duplicate]

Your mission (if you choose to accept it) is to create a memory leak. In a vein similar to this question, you must write a program that will continuously allocate/consume memory until the system runs ...
59
votes
15answers
13k views
+100

Possibly quit your job with a polyglot

Despite your protest, you have been put to work by your boss on a program that takes a single unsigned integer as input and prints the string "prime" if that integer is prime and "not prime" if it ...
4
votes
2answers
447 views

Another Euler Brick in the Wall

A Euler Brick is a cuboid where the length of all the edges are integers and all of the diagonals of the faces are integers as well. All sides must also be different. Your program has to find as ...
19
votes
7answers
708 views

Family Tree Solver

This is one of several challenges left for the community by Calvin's Hobbies. Take a "family tree describing" file with lines of the form: [ID] [mother ID] [father ID] [gender] [full name] such as ...
-2
votes
0answers
111 views

How obfuscated can you make your code? [closed]

Obfuscated code is something that eludes me. I have no idea how you can hide code like how magicians hide rabbits in their hats. For this challenge, you have to write an obfuscated program that does ...
10
votes
4answers
424 views

How strong are nonary numbers?

You are given a nonary (base 9) non-negative integer consisting of the digits 0 through 8 as usual. However the number of digits in this number (with no leading zeros) is a prefect square. Because of ...
20
votes
11answers
3k views

Plug it back in tonight or this weekend

This is my first code golf so please let me know if it's too broad or if I'm missing any information for a good puzzle! Challenge In Ontario and possibly other areas of the world, electricity is ...
1
vote
15answers
805 views

Concise case changing code

Create the shortest program that given an input string it outputs the opposite-cased string. For example if I pass the string "HeLlO" the program should output "hElLo". Of course, neither aggregate ...
26
votes
31answers
3k views

Lockers vs. Crackers: The Five-Element Sequence

The Challenge A simple "spy versus spy" challenge. Write a program with the following specifications: The program may be written in any language but must not exceed 512 characters (as represented ...
73
votes
30answers
12k views

If a program terminates and there is no one to see it, does it halt?

It's time to face the truth: We will not be here forever, but at least we can write a program that will outlive the human race even if it struggles till the end of time. Your task is to write a ...
-1
votes
3answers
300 views

Linking without a Link

Introduction Hello! This is my second post, and I decided to do one which is more language specific, since my last one was very much orientated towards mathematical languages, and thus did not leave ...
14
votes
6answers
929 views

Morse Decode Golf

I've become alarmed with the growing hatred of spaces and this answer has inspired me to make sure Morse code is safe from this insidious removal of whitespace. So, your task will be to create a ...
19
votes
3answers
2k views

Display the mouse pointer trails… of the future!

Inspired by this example of using d3js, I challenge you to create a canvas (or your language-of-choice equivalent) in which the mouse pointer trails will be displayed, with the following twist: The ...
6
votes
1answer
182 views

Swing Through Trees with Your Grappling Hook

You have found the path through the forest and now plan on travelling along it. However, just before you start on your journey, the ground turns into lava. You manage to scurry up the nearest tree ...
20
votes
3answers
885 views

Drawing Epicyclogons

An epicycloid is the curve a point on a circle makes as it rolls around another circle. A cyclogon is the shape a point on a regular polygon makes as it rolls across a plane. An epicyclogon is the ...

15 30 50 per page