1
vote
0answers
35 views

Remove boxes under preservation of shape

This challenge is specific to languages of the APL family. Although it might be solvable in other languages, please do not expect this to be easy as it depends on some specific concepts of this ...
-5
votes
0answers
23 views

Project data structure using c++ [on hold]

please i want answer this project .. _(
6
votes
4answers
176 views

Remove single line and multiline comments from string

Goal Using the programming language of your choice, write the shortest program to eliminate comments from a string representing a C program. Input The string can be... given as a function ...
-6
votes
0answers
126 views

StackEgg “Automater” [on hold]

As you know, there is a game known as StackEgg on stack exchange. Since we are all busy people, we will write a script to play it for us. Specifically, write a script that does the following. The ...
2
votes
1answer
159 views

■ or ■+■ or ■+■+■ or ■+■+■+■ [duplicate]

Sum of squares Goal: Write a given natural number as sum of squares. Thanks to Lagrange, Fermat and Legendre we know that you can write any positive integer as sum of (one), two, three, or maximal ...
-3
votes
0answers
365 views

Build a Stack Egg Bot [on hold]

Stack Egg is a small game recently released by Stack Exchange. To play it, you can click on the "ad" on the right hand side of the page. The goal is to have your bot propel your favorite Stack ...
-9
votes
0answers
99 views

Tips for Playing Stackegg [on hold]

How do I find and play it? What is the best strategy?
-5
votes
1answer
126 views

Self-Aware Computers, Step 1: Generate a Unique Computer ID [on hold]

Hello gifted programmers! This is Stefan from the "Computer Self-Awareness Project". We create self-aware computers, in a few, understandable steps. I am not very much in the mood for discussing ...
-4
votes
0answers
92 views

Print 2015 without numbers in code [duplicate]

According to: Produce the number 2014 without any numbers in your source code This code prints "2015" without any numbers in the code. Any improvements are appreciated. public static void ...
0
votes
0answers
49 views

Algorithm to find max no. of nodes that can be visited [on hold]

Given an undirected non-weighted graph edges. '1#2', '2#3', '1#11', '3#11', '4#11', '4#5', '5#6', '5#7', '6#7', '4#12', '8#12', '9#12', '8#10', '9#10', '8#9' where for example node 1 and node 2 is ...
9
votes
2answers
370 views

Draw a Random Walk with Slashes

Write a program or function that takes in a positive integer N (via stdin/command line/function arg) and prints or returns a string representation of a two dimensional random walk that is N steps ...
2
votes
2answers
239 views

DoIt Java Style [on hold]

Given string X, convert it to Java Style string, as defined below: Strings may only contain numbers and letters(signs are not allowed) Strings must not start with numbers Strings must start with ...
28
votes
4answers
3k views

Infinite Labyrinths

Background You are the apprentice of a powerful wizard, and your master is currently developing a spell for creating an inter-dimensional labyrinth to trap his enemies in. He wants you to program his ...
9
votes
0answers
166 views

How to recover from DDOS'ed internet

The internet has failed. DDoS attacks are now rampant and widespread. It is up to you to take control and repair the internet. Each bot will control 20 nodes in this network. Every node is either ...
18
votes
2answers
2k views

Brainf*** subprograms with unique outputs

You should write a 100-byte long brainfuck (BF) program. One character will removed from it in every possible way the resulting 100 new (99-byte long) programs. E.g. for the program ++.>. the 5 ...
11
votes
6answers
452 views

Calculate a check digit using the Damm algorithm

There are popular check digit algorithms such as Luhn and then there are good ones, for example the Damm algorithm. The only possible reason behind the popularity of algorithms such as Luhn is that ...
9
votes
1answer
243 views

Shortest Substring Index

I'm a lazy but efficient person, as many of you probably are as well. So, whenever I'm doing something I want to do it with minimal effort. Which is why I'm asking you to solve this problem for me. ...
17
votes
2answers
330 views

Remove an unobstructed rectangle

This image was made by overlaying 7 differently colored rectangles on top of each other: The black and maroon rectangles are unobstructed, that is, no other rectangles are above them. Write a ...
6
votes
1answer
292 views

Reverse every word in a line in vim

Your task is to build a vim script or provide a sequence of keystrokes that will operate on a single line of text with up to 140 printable ASCII characters (anywhere in a file, with the cursor ...
14
votes
2answers
432 views

Build a top-front-side puzzle solver

A top-front-side puzzle is a puzzle where you are required to construct a 3-D shape of (usually cubic) blocks given three orthogonal views: a top view, a front view, and a side view. For example, ...
0
votes
0answers
100 views

Output Pi - Alphanumeric [on hold]

Output π up to at least 5 digits of precision. But no non-alphanumeric characters (each one is a 5 byte penalty), and the lowest bytes wins! Have Fun! You can play dirty (hex, charcodes, etc.) and ...
4
votes
0answers
139 views

Evening Commute Solver

I recently moved to an apartment overlooking the inner ring-road of town, and every day, a beautiful scene unfolds. The traffic lights are apparently so confusing (mostly because the Dutch are used to ...
12
votes
1answer
332 views

How do I get more Klotski in my life?

I really love sliding tile puzzles, but recently, I haven't had time for them. Hence, I need a program to give me my fix of sliding-tile puzzles, specifically Klotski puzzles. Your input will be in ...
-4
votes
5answers
195 views

Print the Longest Sentence

I've searched around, and cannot find a challenge too similar to this one--however, it would not surprise me if this is not the first of its kind. My apologies if I've overlooked something. The ...
4
votes
7answers
468 views

N-gram histogram

Given a text and a number N, output, in a human readable format, the set of the character N-grams with their respective percentages. The smallprint The text can be read from a file, stdin, passed ...
18
votes
16answers
4k views

Shortest Sorted Hello World

Write a program that takes no input and prints Hello, World! to stdout or your language's closest alternative. The catch is that each line in your program must only contain printable ASCII characters ...
10
votes
2answers
187 views

Computing truncated digits sums of powers of pi

Given a positive integer n output the sum of the first n decimal digits of the fractional part of πn. Example input and outputs: 1 → 1 2 → 14 3 → ...
-1
votes
0answers
62 views

Self compressing code [duplicate]

Create a program in any language, that could be used for loss-less compression (see below) of a source code in that language. By loss-less compression I mean any transformation of a source code, that ...
12
votes
3answers
2k views

Express all 16 boolean functions with the less than operator

There are 16 distinct boolean functions for two binary variables, A and B: A B | F0 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | F13 | F14 | F15 ...
-5
votes
0answers
100 views

Please rate my obfuscated C code [closed]

This is my first attempt at writing obfuscated C code. Please tell me what you think and if you like it!!!!! It took me a long time to figure out the trick =) int main(){char b[] = {72, 101, 108, ...
-1
votes
0answers
76 views

Implement a minimal J/kdb+ interpreter : Reverse GOLF! [closed]

In contrast with most code golf here, where clever/compact code is rewarded (in contrast with more clear/verbose code), the J language implementation is implemented in code golf form (ie: from the ...
6
votes
3answers
400 views
+150

IPV4 subnet list cleaner (in CIDR notation)

We have a lot of IPV4 address, to group into subnets, so we need a tool for doing this: Our list is very ugly, not ordered and sometime in subnet notation, sometime in simple address. Sample: ...
10
votes
9answers
882 views

Generate The SUDSI Sequence

The SUDSI sequence (sum, difference, swap, increment) is a curious integer sequence that appears to exhibit rather chaotic behavior. It can be generated as follows: Let S be an infinite list of the ...
13
votes
1answer
379 views

Help our robots reach the teleporter

UPDATE: Added a Python framework to get started. The space-station has been overtaken by crusher-bots. You must direct as many of our expensive and fragile tech-bots called "rabbits" to an exit ...
5
votes
11answers
538 views

Decode a Rövarspråket string

This question is the inverse of this one by James Williams. Rövarspråket Rövarspråket is a word game played by Swedish children, from the books about Kalle Blomkvist by Astrid Lindgren. The basic ...
10
votes
6answers
337 views

Implement a Variable Length Hash

My friend and I have this game that we play with words. It is a fun pastime and it involves "canceling out" letters in a word until there is nothing left. I am really tired of him being so much faster ...
12
votes
20answers
2k views

Convert a string to its Rövarspråket equivalent

Rövarspråket Rövarspråket is a word game played by Swedish children, from the books about Kalle Blomkvist by Astrid Lindgren. The basic rules are as follows (from Wikipedia): Every consonant ...
0
votes
0answers
62 views

Random arithmetic quiz [duplicate]

Given a and b as two random numbers from 0 to 10 and op as a random symbol of arithmetic operations, you should display 10 questions in the format: a op b = to the user, after each question if the ...
23
votes
21answers
3k views

Very Simple Triangles

Write a program or function that takes in a positive integer (via stdin, command line, or function arg) and prints or returns a string of that many of these small triangles tiled together, alternating ...
-3
votes
0answers
45 views

how to compare one pattern-word from user with another list word from big-data, and print out the match word 5 per line? [closed]

import java.util.Scanner; import java.io.*; public class wordHelper { public static void main(String[] args) throws Exception{ //Prompt the user for a pattern Scanner keyboard = new ...
26
votes
8answers
890 views

ASCII topology pt 1: Can I count on you?

I have a serious problem. I have some text files where I keep my very important numbers -- all of the important ones! And twos, and threes.. These numbers were so important that I couldn't entrust ...
6
votes
0answers
196 views

Implement multiplication by a constant with addition and bit shifts

While looking at the ARM instruction set, you notice that the ADD instruction has the so-called "Flexible second operand", which can be abused for quick multiplication. For example, the following ...
16
votes
3answers
653 views

Reconstruct a Permutation

Introduction Suppose that you are handed a random permutation of n objects. The permutation is sealed in a box, so you have no idea which of the n! possible ones it is. If you managed to apply the ...
2
votes
1answer
224 views

Generate the galaxies of elite [closed]

Introduction Elite was the first space trading video game, written and developed by David Braben and Ian Bell and published by Acornsoft for the BBC Micro and Acorn Electron computers in in September ...
-4
votes
5answers
116 views

Generate a random floating point number between 2 limits [closed]

This challenge is to generate a random floating-point number between 2 limits. You may use any language so long as it can be called from the command line, and runs on linux. It must also be able to ...
17
votes
6answers
2k views

Chinese Remainder Theorem

The Chinese Remainder Theorem tells us that we can always find a number that produces any required remainders under different prime moduli. Your goal is to write code to output such a number in ...
7
votes
1answer
328 views

Decrypting a block of AES

Today your goal is to decrypt a secret message using AES. Given a ciphertext and key you will decrypt and print the message. Your program may be in any language. It will be run with input on ...
21
votes
3answers
834 views

How do I craft that?

There are 21 items in Minecraft that you can craft using only wood and items crafted from wood: axe boat bowl button chest crafting table door fence gate hoe ladder pickaxe ...
14
votes
0answers
186 views

Prime polynomials

Given a polynomial, determine whether it's prime. A polynomial is ax^n + bx^(n-1) + ... + dx^3 + ex^2 + fx + g, where each term is a constant number (the coefficient) multiplied by a nonnegative ...
0
votes
0answers
32 views

Floating Point Numbers as Minimal Ratio [duplicate]

Input a floating point number a. Calculate two integers b and c, so that b/c=a is correct to as many decimal places as given by a. b needs to be minimal (so there exists no smaller possible b) ...

15 30 50 per page