All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
462 views

Run a game of Flood

This is a Code Golf challenge. Flood is a game in which the player is presented with a game board such as this: On each turn, you choose a colour (on the link above, by clicking a square containing ...
Glen O's user avatar
  • 2,908
1 vote
52 answers
2k views

Is it a completely even number?

A completely even number is a positive even integer whose divisors (not including 1) are all even. Some completely even numbers are: 2 (divisors: 2, 1) 4 (divisors: 4, 2, 1) 16 (divisors: 16, 8, 4, 2,...
MD XF's user avatar
  • 13.8k
1 vote
4 answers
462 views

Send the pairs in smallest output

Write two programs A and B. Program A (the encoder) takes 1024 pairs of integers \$(k,v)\$, where \$0≤k<2^{32}\$ and \$0≤v<1024\$, and all \$k\$ will be different. It will output a single ...
l4m2's user avatar
  • 20.6k
1 vote
7 answers
283 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 ...
Filip Haglund's user avatar
1 vote
1 answer
201 views

Simple "hyena" program [duplicate]

Write a program that takes a string as an input. For the input: If the input doesn't match the source code, the program shall output the input intact. (Hence a cat) Otherwise, the program shall fall ...
Dannyu NDos's user avatar
  • 5,497
1 vote
0 answers
80 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: ...
TheNumberOne's user avatar
  • 11.5k
1 vote
16 answers
2k views

Drawing the Stack Overflow logo

From here. Every new game is the first day of the month, 12:00 PM UTC. The goal is to create the Stack Overflow logo using ASCII characters. It looks like this. The exact output should look like this:...
user avatar
1 vote
1 answer
5k 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 ...
Connor's user avatar
  • 119
1 vote
3 answers
259 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 ...
0x45's user avatar
  • 790
0 votes
2 answers
492 views

Wir hassen Umlaute! (We hate umlauts!)

Introduction As you all know, German has umlauts. They're these things: ¨ However, most keyboards don't have an umlaut key. That's fine, though, because you can ...
SuperNerd's user avatar
0 votes
7 answers
656 views

Shortest way to get a TypeError

It's simple, simply write the shortest code to raise a TypeError. In Python you can do: raise TypeError However it should be ...
U13-Forward's user avatar
  • 2,001
0 votes
0 answers
102 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: ...
Richard Donovan's user avatar
0 votes
1 answer
323 views

Sunset in every capital [closed]

This is a very simple challenge. Task Whenever your code is run, your code should output the next sunset date and time in GMT for all capital cities on Earth. You should get the list of capitals ...
user avatar
0 votes
2 answers
689 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 ...
mdahmoune's user avatar
  • 2,862
0 votes
1 answer
4k views

Implement DFA/NFA/epsilon-NFA

Write the shortest code that implements a: DFA NFA epsilon-NFA The program should accept as input: a string(that we want to see if is accepted or not) the delta function, represented in whichever ...
Bakuriu's user avatar
  • 779
0 votes
0 answers
175 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 ...
Ypnypn's user avatar
  • 10.8k
0 votes
7 answers
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. ...
Jamie's user avatar
  • 166
0 votes
3 answers
277 views

Output in the Correct Order

Ok lets say we get a input the following csv file (all entries are quoted strings) ...
Adam Speight's user avatar
  • 1,314
0 votes
6 answers
417 views

Generate number from given range

Your function must accept three numbers in any order: A signed real number (or ±Infinity) - The number (N) for which you have ...
EzioMercer's user avatar
  • 1,473
0 votes
0 answers
168 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 ...
Tyrone's user avatar
  • 9
0 votes
4 answers
491 views

Write an program that terminates after 60 seconds - Cops' Thread

This is a cops and robbers challenge - Robber's Thread Write a program that terminates after exactly 60 seconds (or as close to it as possible). For example: ...
TheHans255's user avatar
-1 votes
1 answer
215 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 ...
sparks's user avatar
  • 111
-1 votes
1 answer
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 ...
user1812's user avatar
  • 211
-1 votes
23 answers
2k views

Find next multiple of 32 that follows given number without using *, / and loops

Imagine simple math problem. You have a number, say it's 1000. And you want to find the next multiple of 32 that follows 1000. You automatically make some simple calculations and get the result. ...
gthacoder's user avatar
  • 1,067
-1 votes
5 answers
359 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 ...
ST3's user avatar
  • 1,373
-2 votes
1 answer
341 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 ...
SuperJedi224's user avatar
  • 11.9k
-2 votes
4 answers
791 views

Find the hardest OEIS sequence to golf!

Notice: This question originally had people write comments with a shorter program, rather than new answers. This has been changed so that people with shorter programs can get reputation too. Hopefully ...
pommicket's user avatar
  • 3,129
-3 votes
1 answer
321 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, ...
UTF-8's user avatar
  • 163
-3 votes
4 answers
361 views

Solve an algebraic expression

The Challenge Your task is to create a program that can solve an algebraic equation. Input Input will consist of a String. The string will be an equality ...
AMACB's user avatar
  • 679
-3 votes
53 answers
902 views

Return the highest possible placement value based on the input

Introduction The challenge itself was something I came across and had to try and figure out for a personal of project of mine. I ended up branching out and asking family members if they could provide ...
Script47's user avatar
  • 185
-3 votes
1 answer
232 views

Python Prime Problem [duplicate]

Your challenge is to write a Python program to print all the primes (separated by whitespace) less than a given integer N with an asterisk (...
user101295's user avatar
-3 votes
1 answer
539 views

Find the inverse of a matrix

Write a full program to calculate the inverse of a 4-by-4 matrix. Rules The sixteen values of the initial matrix must be hard-coded to variables, as follows: ...
Ypnypn's user avatar
  • 10.8k
-3 votes
1 answer
8k views

Shortest way to generate UUID's version 3,4 and 5 in php

I have this function to generate UUID's: ...
Ismael Miguel's user avatar
-3 votes
1 answer
870 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 ...
0xrgb's user avatar
  • 109
-5 votes
1 answer
330 views

John's lost arrays

John has made an array of numbers which are important to him. Unfortunately, John lost the array. Luckily, he knows some details about the array. You will receive each of these sets of details (...
McLinux's user avatar
  • 325
-6 votes
1 answer
415 views

Print Hamlet's monologue using as few characters as possible [duplicate]

The task here is to print the text below, using as few characters as possible in your code. You can't use any external resource. (file, stdin, network) ...
user avatar
-6 votes
4 answers
249 views

Binary Magic Cards [closed]

There's a cool magic trick that works using the power of binary. The effect of the trick is as follows: An audience member chooses some natural number in the range of ...
Julian Lachniet's user avatar
-6 votes
10 answers
262 views

The year counter is here [closed]

Create a program that, given an integer N, outputs the number of years we have to get to N A.D. or how many years it has been since N A.D, as a string or int. For example, given 2014, the program ...
AndrewTheCodegolfer's user avatar
-6 votes
13 answers
291 views

Am a I square repdigit? [closed]

Your Task You will write a program or function to return a truthy value if the integer inputted to it is a square repdigit, and a falsy value if it is not. A repdigit is an integer that contains ...
Gryphon's user avatar
  • 7,197
-8 votes
4 answers
253 views

Is it an Arithmetic Sequence or not? [closed]

Challenge In this challenge, the input will be an ordered set of numbers and the program should be able to tell if the set of numbers is an Arithmetic Sequence. Input The input will be a list ...
math scat's user avatar
  • 8,543
-8 votes
3 answers
302 views

What season is it? [closed]

Task When running the program must show the season according to the host computer's current time. Rules The output must be either: Spring, Winter, Summer or Autumn. The capitalization does not ...
Luc H's user avatar
  • 559
-9 votes
1 answer
231 views

Bot Problem.How to solve this problem in c? [closed]

Programming problem: In BotLand, Robots can understand all words of any combination of letters and letters with leading or trailing (not both) numeric value. Given a word W (string of alphanumeric). ...
Mafuj Shikder's user avatar
-10 votes
4 answers
417 views

Output this sequence of numbers

Your challenge is to write a program or function to output this sequence of numbers. Output requirements: Must contain numbers specified above Must be in order as specified Numbers must be delimited ...
user1761786's user avatar
-17 votes
6 answers
1k views

Print 'em goats [duplicate]

Related Goats are great. Everybody loves goats. And they also, for some reason, are an excellent complex ascii art for many languages to have built-ins for. Because of this, I personally feel a ...
ATaco's user avatar
  • 10.7k
-19 votes
30 answers
3k views

Reverse a 1-dimensional array

Note: This challenge is not the same. Challenge Believe it or not, we haven't got ONE challenge for reversing one-dimensional arrays (although we've got one for n-dimensional ones)! This should ...
Erik the Outgolfer's user avatar

15 30 50 per page
1
89 90 91 92
93