All Questions

Filter by
Sorted by
Tagged with
2
votes
7answers
2k views

Alien Name Generator [closed]

Task Write a function to generate names of aliens and their worlds, so that the output is of the form: Greetings Earthfolk, I am ____ of the planet _____. "...
2
votes
1answer
364 views

Simplify the following C ascii graphing function

This wasn't originally intended for code-golf, just as a little debugging routine to roughly visualize something "goofy" going on in a model of some (irrelevant here) physical process. But when I saw ...
2
votes
2answers
233 views

Simulate Rocket League Quick Chat

In Rocket League, there are controls assigned to quick chat. For PC, they are 1, 2, 3, and <...
2
votes
3answers
362 views

Write an program that terminates after 60 seconds - Robbers Thread

This is a cops and robbers challenge - Cop's Thread Each of the cops have been tasked to write a program that terminates after exactly 60 seconds, or as close as possible. For example: ...
2
votes
1answer
386 views

Gode-Colf: Wipping Flords around [duplicate]

Here is another short string related code-golf. You must write a full program that reads a string (from STDIN or as command line arguments, as long as you specify which) and wips the flords around (...
2
votes
2answers
419 views

given prime factors of a number, what is the fastest way to calculate it's proper divisors? [closed]

Given prime factors of a number, what is the fastest way to calculate divisors? ...
2
votes
4answers
476 views

Evaluate the binomial theorem!

Your mission, even if you don't accept it, is to input three numbers from STDIN or file: 5 0.5 6 What you must do is evaluate this: (5a + 0.5b)^6 This basically means that the first two ...
2
votes
1answer
618 views

Recursive Mathematical Puzzle from a high school contest

The problem appeared on the 2013 SJCNY High School Programming Contest. It was the last question in the set of problems and no team produced a correct answer during the 2.5 hours they had to work on ...
2
votes
7answers
632 views

Random with your hands tied [closed]

Task Develop some code to generate a psuedo-random number between X and Y (taken as input). Explain why or how it works. Conditions Do not use any random generating seeds, pre-written randoms, or ...
2
votes
0answers
123 views

Chemical sentences! Encrypting [duplicate]

Background You are bored in class, and having exhausted all the possible things to write on a standard calculator (Like 8008135) you turn to the periodic table. You want to figure out if you can ...
2
votes
2answers
314 views

Generate code in another language [duplicate]

Write a program in language A which outputs a program in language B where: Language A != Language B The output is itself a solution to this question. This is a popularity contest. If you want to ...
2
votes
2answers
206 views

Tips for golfing in Visual Basic

This page is not for Visual Basic .NET Tips or VBA tips Visual Basic (VB or VB6) is an object-oriented and event-driven dialect of basic that was developed and released by Microsoft in 1991. The last ...
2
votes
0answers
246 views

Write the shortest code that bring to a solution of “The old curious knight with a lazy horse” problem [duplicate]

The Story: Once upon a time there was a curious Knight that lived on a never used chessboard in the Realm, an antique store. He spent all his career over there and when it came the moment of the ...
2
votes
6answers
1k views

Self replicating Hello World program [closed]

Create a self-replicating Hello World Program. (The program has the ability to use the compiler, if you want). For example: ...
2
votes
3answers
167 views

Most logical rectangle formula from numbers [duplicate]

Introduction The task is simple. When given a number, output the most logical rectangle. To explain what a logical rectangle is, I provided some examples: Input: ...
2
votes
0answers
253 views

palindrome detection palindrome [duplicate]

Write a function with a single string parameter and a boolean return value. The function should return true iff the string is a palindrome character-wise. Alternatively, write a program that reads a ...
2
votes
1answer
164 views

Black and white shirt 2

This is a more complicated version of this puzzle. The premise is the same but a few rules differ in a few key places, making for a more complex problem. Assume I have some number of black shirts and ...
2
votes
0answers
254 views

What's so great about 1729? [closed]

This is not a duplicate of this question. This is asking for the nth number that can be represented as the sum of two cubes in two different ways, while that is asking for the n-th number that can be ...
2
votes
3answers
357 views

Calculate the first n perfect numbers [closed]

Write a program that calculates the first n perfect numbers. A perfect number is one where the sum of the factors is the original number. For example, 6 is a perfect number because 1+2+3=6. No non ...
2
votes
1answer
471 views

Simplifying Radicals [duplicate]

Given integers a and b in the format a√b (a on the square root of b), make a program that will reduce b and increase a until the radical statement is fully simplified. Example ...
2
votes
1answer
336 views

Create a Boolean parser [closed]

What you need to do is create a Boolean parser. Boolean expressions, in case you haven't heard of them yet, have two inputs and one output. There are four 'gates' in boolean arithmetic, namely OR (...
1
vote
0answers
103 views

Encode the simple substitution cipher [duplicate]

Review First, let's review the Simple Substitution Cipher. To encode a string in the Simple Substitution Cipher, replace each letter in your string with another letter. A letter may not be used to ...
1
vote
1answer
4k views

Find the Longest Palindrome in a String by Removing Characters [duplicate]

Problem: Remove characters from strings to make the longest (character length) palindrome possible. The first line gives an integer value of the number of strings to test. Each subsequent line is a ...
1
vote
2answers
237 views

Tips for golfing in Visual Basic .NET

This page is not for Visual Basic Tips Visual Basic .NET (VB.NET) is an multi-paradigm dialect of basic that was developed and released by Microsoft in 2002 as a replacement for Visual Basic. The ...
1
vote
7answers
385 views

Black and white shirts

This puzzle is based on this Math.SE post. A more complex version of this problem can be found over here. Assume I have some number of black shirts and some number of white shirts, both at least 1. ...
1
vote
0answers
589 views

The polyglot challenge! [duplicate]

A polyglot is a program which can be run by several different language's interpreters/compilers without failing. For example, the stackoverflow 404 page contains a polyglot which runs in Python, Perl,...
1
vote
1answer
229 views

Tips for golfing in Befunge 93 [duplicate]

What general tips do you have for golfing in Befunge 93? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Befunge 93 (e.g. "remove ...
1
vote
6answers
287 views

Tips for golfing Yabasic

Yabasic, or Yet Another Basic is a dialect of basic created by Marc-Oliver Ihm that may be run on Windows, Unix and PAL versions of the Sony PlayStation 2. Development for this language is ongoing. ...
1
vote
2answers
1k views

Longest Seven Segment Word

This question was inspired by Tom Scott's video here. The English language has plenty of words, but what's the longest one that can be displayed on a seven segment display? Your challenge is given a ...
1
vote
1answer
207 views

Dyalog's International Problem Solving Competition (Phase I) – Code Golf Edition [closed]

Every year, Dyalog Ltd. holds a student competition. The challenge there is to write good APL code. However, this is a multiple-holes (common theme is manipulation of data of any type and structure, ...
1
vote
0answers
45 views

Play the card game “Set” [duplicate]

"Set" is a card game played with a deck of 81 cards, twelve of which are pictured below: Each card has four attributes, each of which may assume three values: Number: the number of symbols, either 1,...
1
vote
0answers
73 views

Merry Christmas (and a Happy New Year) [duplicate]

The goal of this challenge is to create a program that outputs a string depending on the time of year. Output If the date is December 25, output: ...
0
votes
0answers
160 views

Find the number of strings from the list that have a Levenshtein distance of 3 or less to the string “together” [duplicate]

Possible Duplicate: Find the minimum edit distance between two strings The file below (see link) contains 58,111 lines with a single lower case word on each line. Find the number of strings from ...
0
votes
2answers
291 views

How compute WPA key? [closed]

WPA2, the actual encryption standard that secures all modern wifi networks, has been cracked... This challenge has nothing to do with the way that the WPA2 was cracked, however is is about computing ...
0
votes
6answers
257 views

What's the missing column/row? (GCJ 2016-1A rankfile)

There is an N x N square of numbers. All columns increase strictly monotonically from top to down All rows increase strictly monotonically from left to right There ...
0
votes
7answers
1k views

Acrostic Poem - Programming [closed]

TASK: Make an acrostic poem in the lines. e.g. BATCH break attrib -h acrostic.txt type acrostic.txt cls help The output CAN also be an acrostic poem. ...
0
votes
0answers
157 views

Create a chain of programs in different languages [duplicate]

Create a program in any language, which outputs the source code for a program in another language, which outputs the source code for a program in another language, and so on. Please post at the top ...
0
votes
0answers
84 views

Josephus Problem [duplicate]

With n people numbered 1 to n in a circle, every second one is eliminated until only one survives. For example, for n=10, the elimination order is 2 4 6 8 10 3 7 1 9, so 5 survives. The problem: ...
0
votes
3answers
254 views

Output in the Correct Order

Ok lets say we get a input the following csv file (all entries are quoted strings) ...
0
votes
7answers
402 views

Embedded Triangles!

Your task: given an integer n, output an embedded triangle to the nth depth. Standard methods of input and output, input in any ...
0
votes
0answers
155 views

reversion of string in c [duplicate]

In python reversing of string is as easy as: string[::-1] But not very same in c. This is the code I am using to reverse integers in C: ...
0
votes
3answers
231 views

Havel-to-da-Hakimi [duplicate]

It was a dark and stormy night. Detective Havel and Detective Hakimi arrived at the scene of the crime. Other than the detectives, there were 10 people present. They asked the first person, "out of ...
0
votes
11answers
862 views

HyperNeutrino is back!

Today, @HyperNeutrino succeeded merging his two accounts, and finally got the reputation he lost back. Now, it's time to celebrate! Your task is to output this exact text: /\ ...
-1
votes
1answer
206 views

Solitaire no-win states [duplicate]

NOTE: SIMILIAR TO Solitaire Dreams - Creating a winnable solitaire starting hand Find a minimum of 5 deck orders where if the cards were dealt out would create a game of Klondike Solitaire where ...
-1
votes
1answer
2k views

Solve this math problem in smallest amount of code [closed]

Here I found a cool math problem. I thought you could write some golfed code to compute all answers between x and x.(there is an infinite amount). Problem: Once upon a time, and old lady went to sell ...
-1
votes
5answers
336 views

Do not use the same code again [closed]

I want to give a task. The main rule is not to use the same code again, it means no loops, no jumps, no goto, no recursion, if you declare procedure it can be called only once and etc. Also if you ...
-2
votes
1answer
223 views

Generate a hexdump of a file! [duplicate]

In this task, your goal is to write a program for generating hexdumps of files of arbitrary types. Input The input consists of a (relative or absolute) path to the file to be processed. It may be ...
-3
votes
13answers
573 views

Generate and print the first 20 Fibonacci numbers with the least unique characters

As the title suggests, my task is fairly straightforward: Write a program in your language of choice that will print out the first 20 Fibonacci numbers using the least unique characters. For example ...
-3
votes
1answer
555 views

Biggest number challenge (Brainfuck) [duplicate]

This is a brainfuck version of Largest Number Printable, and this. Let's think about brainfuck interpreter such that, Has array that can be stretched left & right arbitrary large Each cell can ...
-3
votes
1answer
205 views

Find an Eulerian Circuit

Challenge You have been assigned a task to write a program which takes a multigraph as its input and if it contains an Eularian circuit to return one. Otherwise, the program's behavior is undefined, ...

15 30 50 per page