3
votes
4answers
129 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 ...
1
vote
1answer
97 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 ...
-2
votes
0answers
41 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: []{}() ...
-9
votes
0answers
41 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 ...
1
vote
0answers
66 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 ...
-4
votes
0answers
58 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 ...
4
votes
0answers
157 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 ...
9
votes
5answers
270 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 ...
10
votes
8answers
1k 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 ...
1
vote
0answers
160 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 ...
5
votes
1answer
297 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, ...
17
votes
35answers
2k 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
291 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
224 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
442 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
595 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
111 views

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

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 ...
34
votes
10answers
4k 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
269 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 ...
7
votes
3answers
406 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
274 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 ...
45
votes
11answers
8k 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
1answer
365 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 ...
17
votes
7answers
636 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 ...
-6
votes
0answers
53 views

Print “Hello World” with shortest program [duplicate]

I have a challenge: Print "Hello World". You have to make your program thread safe to ensure the output is printed in the right order. And The shortest program wins.
-2
votes
0answers
102 views

How obfuscated can you make your code? [on hold]

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
423 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
13answers
651 views

Shortest program to output an upper/lower/both-cased string [on hold]

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 ...
25
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 ...
62
votes
29answers
10k 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
291 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
907 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
175 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
823 views
+150

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 ...
-1
votes
0answers
95 views

“abc” strings that don't contain “ac” [duplicate]

How many strings of length n containing characters 'a', 'b' and 'c' can be formed? The substring "ac" should not be present in the string. A substring is any contiguous portion of a string. A ...
-5
votes
0answers
94 views

ll and his love [closed]

LL is so much in love with numbers that all girls stay away from him. He tried once, but was rejected. So now, he gives all his time to numbers. But cute numbers want to do the exact opposite, because ...
7
votes
5answers
373 views

Shortest script that gives the time passed since a Unix timestamp

What you need to do to win this challenge is to write the shortest "timeago" script that outputs the number of decades, years, weeks, days, hours, minutes, and seconds between a given Unix timestamp ...
-4
votes
3answers
100 views

A simple one-liner for pseudo-random binary string generation [closed]

(Cross-posted here) I'm trying to illustrate the concept of Kolmogorov complexity by comparing two seemingly-random binary strings: while one is truly random, the other can be created by a program ...
-2
votes
0answers
101 views

Town Management, Chapter 1 - Resources and Trade [closed]

Challenge A town named <springfield> has elected you as their Mayor. So you are now Mayor <quimby>. You must, as your first duty, build and stabilize the town's resources including ...
66
votes
54answers
7k views

BrainF***edBotsForBattling - A Brainf*** Tournament

All bots at the battle arena suddenly got brainfucked and no one can explain why. But who cares as long as they are still able to fight - although Brainfuck is the only language they understand ...
-5
votes
1answer
184 views

The Good, The Bad and The Ugly [closed]

The Good, The Bad and the Ugly Gameplay This will be a 5 or 4 stage (the decision will be explained later) king-of-the-hill tournament where programs are pitched against each other to solve an ...
11
votes
9answers
1k views

The Symbols vs. The Letters

The Symbols vs. The Letters The ASCII characters have been divided once again! Your sets are The Letters and The Symbols. The Letters ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz The ...
-5
votes
3answers
117 views

Swap two numbers without using third variable [duplicate]

What are the tricks to swap two numbers without using a third variable. I am aware of the below. Let me know, what other ways we could swap two numbers? x=x+y; y=x-y; x=x-y;
11
votes
13answers
2k views

Shortest Code to randomly place points and connect them

The Task This is quite a simple coding task, all your program has to do is place a point on a canvas (or your alternative in another coding language) and connect it to all the dots already placed. ...
10
votes
6answers
519 views

Given r and n, find first n numbers of x where moving first digit of x to last gives x/r = y

Objective Given input r and n find the first n natural numbers x such that if we rotate the first digit to the last place we obtain x/r. You may assume that 2 <= r <= 9 and 1 <= n <= ...
7
votes
0answers
218 views

Write a functioning bare-bones IRCd

A bit of an unusual one, but hey, why not? :) The objective: Write a functioning IRC daemon in your language of choice that provides barebones functionality, in as few characters as possible. As long ...
9
votes
10answers
1k views

Shortest Longest Increasing Subsequence Code

The Challenge is to write the shortest implementation to find the Longest increasing subsequence . Example : Let S be the sequence 1 5 7 1 8 4 3 5 [length of S = 8 ] We have 1 sub-sequence of ...

15 30 50 per page