Linked Questions

7 votes
8 answers

1, 2, 3, 4, 5, Shaggy [duplicate]

This is my first code golf exercise for you: Your input is two integers n and k. You can assume n >= 1 and k >= 1 You have to output all numbers from 1 to n (inclusively) and replace every element ...
  • 1,375
321 votes
169 answers

Tips for golfing in Python

What general tips do you have for golfing in Python? I'm looking for ideas which can be applied to code-golf problems and which are also at least somewhat specific to Python (e.g. "remove comments" is ...
  • 12.3k
63 votes
121 answers

Duck, duck, goose!

Remember the kids game, 'Duck, Duck, Goose'? No? Me neither. The challenge Print the word 'duck' on individual lines an indeterminate amount of times. Print the word 'goose'. Your program ends. The ...
  • 11.3k
88 votes
57 answers

BrainF***edBotsForBattling - A Brainf*** Tournament

All bots at the battle arena suddenly got brainfucked and no one can explain why. But who cares as long as they are still able to fight - although Brainfuck is the only language they understand ...
  • 1,321
52 votes
52 answers

Count without 3

Background When I was in elementary school, we used to play a game in math class that goes as follows. All kids sit in a big circle and take turns counting, starting from 1. However, the following ...
  • 207k
41 votes
53 answers

Don't give me five!

Question : You will be given the starting and ending integers of a sequence and should return the number of integers within it which do not contain the digit 5. The ...
  • 433
17 votes
24 answers

Generate me some appropriate license plates!

The scenario: You are a software designer working for a gov't-run company that designs license plates for cars and other vehicles. You've been asked to develop software that generates license plates. ...
20 votes
8 answers

Build a "BizzFuzz" program

In traditional FizzBuzz, you are asked to print the numbers from 1 to 100, but replacing every multiple of 3 with "Fizz", every multiple of 5 with "Buzz", and every multiple of both 3 and 5 (i.e. 15) ...
  • 34k
7 votes
2 answers

Tips for golfing in MathGolf

What general tips do you have for golfing in MathGolf? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to MathGolf (for tips which can be ...
0 votes
0 answers

Let's play the boom-game! [duplicate]

back ground in my country we had a silly game as kids, called 7-BOOM! The rules are really simple. We counted 1,2,3... each time we had a number that one of his digit is 7 or it is a multiply of 7 ...
  • 101