Linked Questions

6 votes
0 answers

Make an integer adder with the C preprocessor [duplicate]

The C preprocessor is not turing-complete, but you can do some pretty cool stuff with it. The challenge is to make an integer adder with it. You can use any representation you like: base 2, base 10, ...
SoniEx2's user avatar
  • 377
551 votes
241 answers

Showcase of Languages

Notes This thread is open and unlocked only because the community decided to make an exception. Please do not use this question as evidence that you can ask similar questions here. Please do not ...
79 votes
261 answers

Is this even or odd?

Note: There is not been a vanilla parity test challenge yet (There is a C/C++ one but that disallows the ability to use languages other than C/C++, and other non-vanilla ones are mostly closed too), ...
Matthew Roh's user avatar
  • 5,347
80 votes
94 answers

Golf all the 16 logic gates with 2 inputs and 1 output!

For example, the gate A and B is a logic gate with 2 inputs and 1 output. There are exactly 16 of them, because: each logic gate takes two inputs, which can be ...
Leaky Nun's user avatar
  • 49.7k
76 votes
59 answers

Tips for code-golfing in C#

What general tips do you have for golfing in C#? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to C# (e.g. "remove comments" is not an ...
jcolebrand's user avatar
  • 1,873
30 votes
144 answers

Multiply two numbers

Input: Two decimal integers. These can be given to the code in standard input, as arguments to the program or function, or as a list. Output: Their product, as a decimal integer. For example, the ...
anna328p's user avatar
  • 6,376
48 votes
83 answers

Type uniqchars!

Given a string consisting of printable ASCII chars, produce an output consisting of its unique chars in the original order. In other words, the output is the same as the input except that a char is ...
Luis Mendo's user avatar
  • 105k
47 votes
85 answers

Greatest Common Divisor

Your task is to compute the greatest common divisor (GCD) of two given integers in as few bytes of code as possible. You may write a program or function, taking input and returning output via any of ...
Mike Shlanta's user avatar
52 votes
35 answers

Tips for golfing in x86/x64 machine code

I noticed that there's no such question, so here it is: Do you have general tips for golfing in x86/x64 machine code? If the tip only applies to a certain environment or calling convention, please ...
ბიმო's user avatar
  • 16.8k
16 votes
48 answers

Alternating Sign Sequence

Introduction The sign of a number is either a +, or a - for every non-zero integer. Zero itself is signless (...
Adnan's user avatar
  • 44.4k
48 votes
14 answers

Draw the "Cool S"

Introduction We all know the cool S (also known as Superman S, Stüssy S, Super S, Skater S, Pointy S, Graffiti S etc. etc.): billions of schoolchildren around the world drew this S and immediately ...
Beta Decay's user avatar
  • 23.4k
15 votes
23 answers

Rarity of a String

Input: A string Output: The rarity of the string, as described below. To find the rarity of a string, follow the steps below. Start with 0. Subtract 3 for each E, A, T, or O in the string. Subtract 2 ...
user avatar
11 votes
20 answers

Add two really big numbers

Preamble We've already proven we're good at adding two numbers, but many solutions only operate on tiny numbers like 2³²-1, honestly we can do a lot better. The Challenge Given two unsigned, non-...
ATaco's user avatar
  • 10.8k
31 votes
8 answers

crossed out 44 is still regular 44 ;(

Introduction On March 24th, 2015 @isaacg golfed his Pyth answer from 44 to 42 bytes. Since a crossed out 44 (44) looks a lot like a regular 44, @Optimizer made the following comment: striked out ...
Kevin Cruijssen's user avatar
24 votes
3 answers

Write a Whitespace Interpreter

Challenge: Your challenge is to write an interpreter for Whitespace. Given a string consisting of spaces, tabs, newlines, and potentially other characters, as well as possible inputs for the ...
Kevin Cruijssen's user avatar

15 30 50 per page