All Questions

0
votes
0answers
23 views

Monkeys at a Typewriter

Sometimes when you press a key on a keyboard, the letter doesn't always display on screen. Whether this is because of a dodgy connection or otherwise, you have decided to write a script to control the ...
9
votes
2answers
74 views

Sort a List With Swaps and Pops

Consider a randomized list of the integers 1 to N. You want to sort it using only the following actions: Swap the first and last list elements. (S) Pop off the first element and append it to the end ...
4
votes
0answers
78 views

Mondrian painting description langage

This challenge consists in coding an interpreter for a Mondrian painting description language (MPDL). Language definition The language operates on a stack of rectangles. A rectangle is defined by ...
-3
votes
0answers
22 views

Css selector adding pesudos and browser support [on hold]

I found this Javascript css selector online a while back and edited it to my needs and it does its job perfectly well in modern browsers. My challenge is: For you to make this selector better / with ...
2
votes
0answers
66 views

Are You the One? (Mastermind Derivative)

I've got a tough one for you! My girlfriend recently came across a new show on MTV (USA). It's a terrible show, and everyone on it is trashy, but the "game" is pretty interesting. From Wikipedia: ...
4
votes
6answers
289 views

Leave your mark!

In this challenge, you'll need to edit a grid of characters to make a program that does a task, while ensuring that you leave a lasting mark on the grid. Task The task to perform is determined by ...
4
votes
0answers
91 views

Scriptbot Warz!

Scriptbot Warz! Your task, should you choose to accept it, is to code a Scriptbot which can traverse an ASCII map and destroy its opponents. Each battle will take the form of a random-starting-order ...
2
votes
0answers
169 views

Break Stack Exchange

Trick the user that StackExchange is broken: It can be done in several ways: Your program starts a browser in some certain way (with a proxy server, for example); Your program shows static ...
8
votes
2answers
272 views

Sabotage the coding standards [on hold]

There are various coding standards enforced at software companies which have the goal of increasing code reliability, portability, and, most importantly, readability in code written jointly by ...
2
votes
1answer
142 views

Code to toggle a program

Challenge Write a program that toggles another. Your program should accept exactly two command arguments. Specifically, your two tasks are: If the names of any running processes are identical to ...
-4
votes
0answers
68 views

I woz ere. Ere I woz [duplicate]

In as few amount of Unicode characters as possible, print the following: I woz ere. Ere I woz. Woz I ere? Course I woz! Exact punctuation and capitalization is required. You must create the ...
9
votes
2answers
2k views

Onion Programming

Using only printable ASCII (hex codes 20 to 7E), write a square N×N core program without comments that is surrounded by 4 more layers, creating a (N+8)×(N+8) square program (N > 0). For N = 3 the ...
5
votes
4answers
275 views

Underground geek rock band names

We have a group of stealthy computer-savvy geeks who are also musicians with a very subversive element to their songs that the authorities in their totalitarian country just can't stand, and are ...
-6
votes
2answers
65 views

Print the Value of a Word in Binary Form if each word is worth its place in the Alphabet? [on hold]

For this challenge, the program must take an input as a string, and output its number value in binary form (base two). If we assign each number a value based on its position in the alphabet, 'A' = 1, ...
-1
votes
1answer
142 views

Program an Artistically Rich Comic Strip [on hold]

The Challenge Program a comic strip. As artistically rich and detailed as you can possibly make it, so long as it complies with the following rules: the comic must be your own original work, not a ...
-2
votes
0answers
74 views

Where do the floats go? [on hold]

I'm writing a program that is supposed to take some data out of text files and analyze it. It has two functions, FWHM() and HM_angels(). We are to talk about the second. The program opens two text ...
0
votes
4answers
492 views

The Most Complex Chinese Character

Challenge You must output the Chinese character for biáng. Your program must not access any external sources and must exactly reproduce this SVG in every way. Note that the image below is just a gif ...
-5
votes
0answers
67 views

Which of the following execution is equivalent to the body of doSomething(n)? [on hold]

// precondition n>0 doSomething(int n) { int x=0; for(int a=0;a<n;a++) { for(int b=0;b<n;b++) { x++; } } return x; } Which of the following execution is equivalent to the body of ...
34
votes
32answers
4k views

ASCII's 95 Characters…95 Movie Quotes

In 2005 the American Film Institute produced AFI's 100 Years...100 Movie Quotes, a list of the best quotes in American cinema. Here they are listed exactly as they should be used in this challenge: ...
27
votes
26answers
2k views

Character Cross

I was expecting to post something more complex as my first puzzle in PCG, but a particular, uh... homework question on Stack Overflow inspired me to post this. They want to: print the following ...
3
votes
2answers
268 views

The Mirror Maze Mania

Puzzle There are some mirrors located throughout a grid. A ray of light enters the grid from some position. It travels through the grid in a straight line trying to escape. On encountering with a ...
5
votes
1answer
289 views

Make your country proud!

You are from the tiny country of Que-Wopistan. The Que-Wopistonion's are a proud people, and every Que-Wopistonian dreams of making their country proud by representing their country in the Olympics. ...
10
votes
4answers
778 views

Convert x-illion into standard form

Given a string, consisting of a prefix and then "illion", convert this number into standard form. For example: "million" -> 10^6 "trillion" -> 10^12 "quattuordecillion" -> 10^45 The ...
8
votes
4answers
307 views

Decompose a number into a sum of repdigits

Repdigits are numbers of the form a * (10^n - 1)/9 with a in [-9,9]\{0} (in other words 111, -3333, 66, numbers which are made by repeating only one digit) Goal: Write a program or function which ...
8
votes
36answers
2k views

Print the ASCII table

The task is to display n characters of the ASCII table. You may write a function (or a program that takes the argument as a parameter, STDIN is allowed as well) that takes a parameter n, which will ...
5
votes
2answers
270 views

Invent your own Unicode 7.0.0 encoding (as efficient as possible)

As you may know, the Unicode standard has room for 1,114,111 code points, and each assigned code point represents a glyph (character, emoji, etc.). Most code points are not yet assigned. Current ...
17
votes
1answer
490 views

Can you hear me now?

Background You are a rich executive of a software empire. Your time is worth a lot of money. As such, you must always travel in the most efficient route possible. However, as an executive, you spend ...
12
votes
2answers
445 views

Choose-Your-Own-Language Code

Let's take a grid of 16x16 printable ASCII characters (code points 0x20 to 0x7E). There are 30-choose-15 paths from the top left to the bottom right corner, making only orthogonal moves, like the ...
-4
votes
0answers
69 views

How to minimize the python code, than make dict for non emty lists [on hold]

params1 = [1,2] params2 = [] params3 = [3,4,5,6] summary = {} if 0 < len(params1): for param1 in params1: summary['param1'] = param1 if 0 < len(params2): for ...
11
votes
7answers
977 views

Determine the Base that a Given Equation is True

Given 3 integers, determine the lowest possible base for the first two integers to multiply into the third. If you think of the Answer to Life, the World, and Everything, 6 * 9 == 42 is true in Base ...
3
votes
0answers
135 views

Crafting Canonically Cöcher Crosswords

The Setup Most of us are familiar with crossword numbering, which follows three basic rules: in a character grid consisting of blacks and whites (see below), any maximal contiguous horizontal or ...
103
votes
115answers
12k views

Evolution of “Hello World!” (testing new type of challenge)

The challenge is to make a program that prints Hello World! to stdout. The catch is that your program must have a Levenshtein distance of 7 or less from the program in the answer submitted before ...
-6
votes
1answer
137 views

Under Control - Challenge [on hold]

I build a cross platform strategy game for you. Its going to be published on Google Play and Facebook, it does not cost money, it has no commercials and its 100% free! My only goal here is making fun. ...
-6
votes
2answers
186 views

What? This should run in seconds [duplicate]

Your task is simple. Write a program that should obviously run in a small time (less than 10 seconds), but instead runs in a huge time (hours or even more). This is a popularity contest, so be ...
0
votes
1answer
115 views

Smallest number you can get by adding up numbers in sequence [on hold]

You a sequence of numbers like this one given to you as a string: "1 2 3 4 8 11 19 33 59 154 196 260" Create a program (any language) that calculates the smallest outcome you can't get by adding two ...
17
votes
7answers
1k views

Reassuring parables

Quite a few people here are probably avid XKCD readers. So, I figure I'd challenge you guys to do something that Megan can do easily: make a script that generates thousands of reassuring parables ...
10
votes
0answers
153 views

Triangular battleships (A computational geometry problem)

You are the captain of a battleship. The engineering department's been cutting corners with designs this year, so the ship you're on takes the shape of a simple triangle. You walk out onto the deck ...
9
votes
3answers
436 views

Four color theorem

The Four color theorem States that no more than four colors are required to color the regions of a map. The challenge Given a list of State borders assign each state ID a color so that no two ...
3
votes
4answers
413 views

Find imperfect anagrams

The goal of this challenge is to write a program which takes a string (of any length) as input and displays anagrams (see these examples of anagrams) of this string, made by taking words in a ...
6
votes
5answers
231 views

Code Crosswords - Solutions

This is the companion question for Code Crosswords. Robber answers go here. See Where should we put robbers? for meta-info.
15
votes
6answers
663 views

Code Crosswords

This is a cops-and-robbers challenge. Answer here if you are a cop (crossword maker), answer the companion question if you are a robber (crossword solver). You may take on both roles. Cops (Puzzlers) ...
9
votes
6answers
408 views

Simulate a Cyclic Tag System

A cyclic tag system is a tiny, Turing-complete computational model consisting of a two-symbol alphabet (I'll use {0,1}), a finite, nonempty cyclic list of productions that consist of those two ...
-1
votes
0answers
25 views

A tangent circle element between 2 intersecting vectors [migrated]

2 Vectors, which are originating from one point I. I want to the replace the sharp corner (I) with an arc (circle element) with a radius of r. The arc touches the vectors at T1 & T2. What is the ...
5
votes
3answers
237 views

Edge Elimination Number

From Erich Friedman's Math Magic, (problem #2 on that page) your challenge is to find the edge elimination number of a connected graph. A single edge elimination is the removal of an edge from a ...
-1
votes
0answers
93 views

Find the Bacon Number [duplicate]

Challenge Given the name of an actor, you must find their Bacon number. You must use IMDB, and if there are multiple actors of the same name, you must choose the first. You must only use the films ...
20
votes
16answers
3k views

Multiply two numbers without using any numbers

You are given as input two strings representing positive integers in base 10, such as "12345" and "42". Your task is to output a string containing their product, "518490" in this case. The twist is ...
17
votes
3answers
675 views

Book Stack Sort

When stacking books you usually want to put the largest ones at the bottom and the smallest ones at the top. However, my latent OCD makes me feel very uneasy if I've got two books where one is shorter ...
8
votes
2answers
288 views

Python: I wish I was PHP

There's an old story about a stonecutter who was never satisfied with what he was. He wished he could become the sun, and so he was. Blocked by the clouds, he wished to be - and became - a cloud. When ...
45
votes
54answers
6k views

Write lines in detention

Introduction Bad news guys - you got detention. Your English teacher doesn't understand this site and wants you to "stop doing math on your digital dohickeys, this is English class!" She sentenced ...
7
votes
1answer
472 views

Circle packing in a rectangle

Your task is to write a program that finds the largest radius that N circles can have and still fit inside of a rectangle that is X by Y pixels large. (similar to this wikipedia article) Your program ...

15 30 50 per page