66 questions linked to/from Tips for golfing in R
49k 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 ...
11k views

### Determine whether strings are anagrams

Challenge Given two strings, work out if they both have exactly the same characters in them. Example Input word, wrdo This returns true because they are the ...
12k views

### Determine the color of a chess square

Your challenge is to write a program that outputs the color of a given square from the chessboard. This is how a chessboard looks: You can see that the square a1 is dark, and h1 is a light square. ...
15k views

We all know the classic dad joke that goes something like this: Somebody says a sentence to describe their self (e.g. I'm tired or ...
7k views

### Test a number for narcissism

A Narcissistic Number is a number which is the sum of its own digits, each raised to the power of the number of digits. For example, take 153 (3 digits): 13 + 53 + 33 = 1 + 125 + 27 = 153 1634: ...
7k views

### Notcalc (Calculate the wrong answer)

Goal: Given two natural numbers (integers from 0 to infinity), output a number that is not the sum of those numbers, but is a natural number. Example solutions (TI-Basic): ...
12k views

### Non-discriminating Programming

We say a string is non-discriminating if each of the string's characters appears the same number of times and at least twice. Examples "aa!1 1 !a !1" is non-...
7k views

### Convert YYYYMM to MMMYY

Basing on this SO question. Challenge is rather simple: given a date period in the format YYYYMM output it in the format MMMYY. ...
11k views

### Enlarge ASCII art

In this challenge, you must take multiline ASCII art as input, such as: ...
5k views

### Multiplicative persistence

Multiplicative Persistence Multiply all the digits in a number Repeat until you have a single digit left As explained by Numberphile: Numberphile "What's special about 277777788888899?" Numberphile ...
3k views

### Output the PPCG Prime

This is the PPCG Prime 624 digits long ...
7k views

Challenge Description: Write a program that asks the user for input. The user will enter Good or Bad. You do not have to ...
3k views

### Print my clock's alarm sound

Write the shortest program that prints the sound my alarm clock makes, and stops after an inputted number of beeps. For reference, here is the sound my alarm makes: ...
I've been posting relatively hard challenges recently, so here goes an easy one. Task Given an array $A$ and a number $n$, calculate the sum of all numbers of $A$ multiplied by $n$, except the ...