CARVIEW |
Select Language
HTTP/2 200
date: Thu, 31 Jul 2025 10:16:54 GMT
content-type: text/html; charset=utf-8
cf-ray: 967c57cd087f860e-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=a93433b5-a18a-49b2-9bfa-9423eef363f8; expires=Fri, 31 Jul 2026 10:16:54 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: f9413047-4f89-47bf-9372-866d3f52b4b1
x-worker-origin-response-time: 317000000
x-dns-prefetch-control: off
set-cookie: prov=a93433b5-a18a-49b2-9bfa-9423eef363f8; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=.kSiYMTTqef7T.KOWFSthQ6sutvaykaxuUh11NVIhBM-1753957014-1.0.1.1-ywKh3mDlrww5fEHb8sH0ibx2wONL.GLxY5YC7.S7woR2O5hVUX1N02GSMa7ZauyYhB1t1mS8IYXcI8.w_CwdG_GpAedvizqcblt78DRjaZk; path=/; expires=Thu, 31-Jul-25 10:46:54 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=xh4GQttXiXb719EsWVA1yFHbQy.mNgse6W_MbAjxjz4-1753957014898-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Hot Linked Questions - Code Golf Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more.
View results.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsLinked Questions
49 questions linked to/from Tips for golfing in x86/x64 machine code
203
votes
434
answers
82k
views
1, 2, Fizz, 4, Buzz
Introduction
In our recent effort to collect catalogues of shortest solutions for standard programming exercises, here is PPCG's first ever vanilla FizzBuzz challenge. If you wish to see other ...
71
votes
243
answers
20k
views
Add two numbers
Input: Two integers. Preferably decimal integers, but other forms of numbers can be used. These can be given to the code in standard input, as arguments to the program or function, or as a list.
...
57
votes
170
answers
12k
views
Stay away from zero
Task
Given a non-negative integer n, output 1 if n is 0,...
57
votes
137
answers
20k
views
Is this number evil?
Introduction
In number theory, a number is considered evil if there are an even number of 1's in its binary representation. In today's challenge, you will be identifying whether or not a given number ...
52
votes
92
answers
7k
views
The shortest way to find one unique value when all other values are the same
In this question at Code Review they tried to find the fastest way to return the unique element in an array where all the elements are the same except one. But what is the shortest code that ...
49
votes
90
answers
5k
views
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 ...
79
votes
65
answers
9k
views
Is it a Cyclops number? "Nobody" knows!
Task:
Given an integer input, figure out whether or not it is a Cyclops Number.
What is a Cyclops number, you may ask? Well, it's a number whose binary representation only has one ...
67
votes
69
answers
10k
views
The Luhn algorithm for verifying credit card numbers, etc
Challenge
Write the shortest program or function to calculate the Luhn Algorithm for verifying (credit card) numbers.
Luhn algorithm explained
From RosettaCode, this algorithm for the purposes of ...
47
votes
86
answers
9k
views
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 ...
45
votes
82
answers
6k
views
Print random integers until 0
You are to write a program which generates random integers between \$0\$ and \$99\$ inclusive, outputting each integer in turn, until \$0\$ is generated. You may choose which single-order random ...
62
votes
38
answers
12k
views
Print the phrase "And she said, 'But that's his.'" using only the alphabet
Print the phrase And she said, 'But that's his.' using only the following characters: ...
34
votes
89
answers
4k
views
Swap the parity
Task
Given a positive integer n, output n+1 if n is odd, and output ...
66
votes
47
answers
6k
views
User Appreciation Challenge #1: Dennis ♦
I got the spontaneous idea of making a series of challenges of users that have helped and continue to help the PPCG community be an enjoyable place for everyone, or maybe just specifically for me. :P
...
60
votes
49
answers
5k
views
How many steps does it take from n to 1 by subtracting the greatest divisor?
Inspired by this question over at Mathematics.
The Problem
Let n be a natural number ≥ 2. Take the biggest divisor of ...
36
votes
68
answers
5k
views
GET your dubs together
On 4chan, a popular game is get. Every post on the site gets a sequential post ID. Since you can't influence or determine them, people try to guess (at least a part of) their own post number, usually ...
Welcome to Code Golf and Coding Challenges Stack Exchange! This is a site for recreational programming competitions, not general programming questions. Challenges must have an objective scoring criterion, and it is highly recommended to first post proposed challenges in the Sandbox.
- The Overflow Blog
-
-
- Featured on Meta
-
-
Hot Network Questions
- Is it common practice to run neutral and ground to the same bar?
- Is AI ethics a new area of philosophy?
- How Set curve radius geometry node works
- Sci-fi novel of an exploration of an abandoned Earth
- What are ways to prevent overly long ballots?
- Why are people so okay with stereographic projection mapping "every direction of infinity" to a single point?
- Is it ethical to hire a graphic designer for a job talk?
- Golden-section optimization with complication
- Many people, when faced with a statement, exclaim: “PROVE IT!” But are they truly aware of what they’re saying? What is a proof? What does it mean?
- where's this road in front of mountains, near Joseph Oregon?
- Can I bring mycelium pellets into Greenland?
- Which movie first customized a production logo?
- Uniqueness of multiple unnamed namespaces within translation unit
- Why do C compilers still prefer push over mov for saving registers, even when mov appears faster in llvm-mca?
- FOR XML PATH and OPTION() can't be together in query?
- Blakes 7 episode Powerplay. What were the 'hospital staff,' planning to do?
- Stepping down voltage from Li-ion to simulate 2x AAA batteries
- Should I simply accept the terms without reviewing them for legal appropriateness?
- using `find` to find a file in PATH
- Short story about a scientific rivalry that leads to madness
- Does intersubjectivity legitimize falsehoods?
- Why are collision manifold points created inside objects instead of on their surfaces?
- How do I attach non-edible flowers to cake?
- Need help in aligning math as desired with `amsmath` `align` environment