Linked Questions

152
votes
279answers
43k 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 ...
28
votes
70answers
6k views

Return 1 - Popularity Contest [closed]

The Task Create a function/subroutine which returns 1. You can make it as elaborate as you like, as long as it returns 1. The Rules The entry with the most upvote wins - just like any popularity ...
95
votes
28answers
6k views

Does the code terminate?

This is a code golf challenge I thought of with a mathematical bent. The challenge is to write the shortest code possible such that it is an open question whether or not the code terminates. An ...
46
votes
43answers
4k views

Tips for golfing in PowerShell

What general tips do you have for golfing in Windows PowerShell? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to PowerShell (e.g. "...
21
votes
16answers
2k views

Recursive Collatz Conjecture

The Collatz conjecture postulates that if you take any positive integer, then repeat the following algorithm enough times: ...
12
votes
12answers
2k views

Hitting 495 (Kaprekar) [duplicate]

Input: A three digit number from stdin or as an argument not all digits are the same may start with one or two zero's Process Order the input-digits ascending and descending to form two new ...
7
votes
17answers
581 views

Extract and Divide

Challenge For a given positive integer \$n\$: Repeat the following until \$n < 10\$ (until \$n\$ contains one digit). Extract the last digit. If the extracted digit is even (including 0) multiply ...
22
votes
9answers
970 views

Print the Super Collatz numbers

The Collatz Sequence (also called the 3x + 1 problem) is where you start with any positive integer, for this example we will use 10, and apply this set of steps to it: ...
31
votes
3answers
733 views

Build a golfing language with me

A lot of PPCG users helped with the creation of this challenge, both in chat and the Sandbox, specifically Martin Ender, AdmBorkBork, Emigna and user202729 Our community has found it necessary to ...
7
votes
3answers
873 views

Find a set of 10 numbers such that all pairs have a different GCF

The set of ten numbers below: ...
7
votes
7answers
310 views

Count the reviews!

Introduction and Credit Imagine you're Amazon. Imagine you have a large number of products for which a lot of people have written reviews scoring 1-5 stars. Now you need to give your customers a ...
8
votes
2answers
1k views

Collatz Attack!

This challenge is based on some new findings related to the Collatz conjecture and designed somewhat in the spirit of a collaborative polymath project. Solving the full conjecture is regarded as ...