# Langton’s Ant

Langton’s Ant moves on a grid of squares that can be either black or white. The grid begins as fully white and the ant can only face left, right, down or up. It then moves in accordance to the following two rules:

• If the ant is on a black square, it changes the colour of the square to white, rotates 90 degrees anticlockwise and moves forward one square.
• If the ant is on a white square, it changed the colour of the square to black, rotates 90 degrees clockwise and move forward one square.

Find the total number of black squares on the grid after the ant moves 1000 times.

Remember, to solve this puzzle and appear on the leaderboard, email both your solution and your source code (in any language) to lewiscornwall13@gmail.com. Good luck!!

View all puzzles »

# Note

I am very sorry, but I cannot post a puzzle this week. Sorry for any inconvenience caused.

# Square Triangles

A Square Triangular Number is number which is both triangular and a perfect square (36 for example). Find the sixth Square Triangular Number (including 1, but excluding 0).

Remember, to solve this puzzle and appear on the leaderboard, email both your solution and your source code (in any language) to lewiscornwall13@gmail.com. Good luck!!

View all puzzles »

# The Reddo

The Reddo is a new currency, which comes in coin denominations of all the prime numbers less than twenty. For example, 10 Reddos can be made with five combinations of coins:

• 2 Reddos + 2 Reddos + 2 Reddos + 2 Reddos + 2 Reddos
• 3 Reddos + 3 Reddos + 2 Reddos + 2 Reddos
• 5 Reddos + 3 Reddos + 2 Reddos
• 5 Reddos + 5 Reddos
• 7 Reddos + 3 Reddos

Find the number of combinations in which 50 Reddos can be made.

Remember, to solve this puzzle and appear on the leaderboard, email both your solution and your source code (in any language) to lewiscornwall13@gmail.com. Good luck!!

View all puzzles »

# Monday 1st January

Happy New Year from contestcoding!

Find the number of years between 0 AD to 2014 AD that have began (on the 1st January) on a Monday.

Remember, to solve this puzzle and appear on the leaderboard, email both your solution and your source code (in any language) to lewiscornwall13@gmail.com. Good luck!!

View all puzzles »

# Lexicographic Permutations

For the purposes of this problem the characters of the string “Contest Coding” are assigned values, the value assigned to a particular character determined by the position in the string of that character – viz:

‘C’ (1), ‘o’ (2), ‘n’ (3), …etc.…, ‘i’ (12), ‘n’ (13), ‘g’ (14)

That sequence of values is considered the 1st lexicographic permutation; given the characters to which those values are assigned, what nth lexicographic permutation will first contain the sequence of characters “tsetnoC”?

– This puzzle was suggested by Mark Bishop

Remember, to solve this puzzle and appear on the leaderboard, email both your solution and your source code (in any language) to lewiscornwall13@gmail.com. Good luck!!

View all puzzles »

# Base 36

To convert between bases, follow the instructions at this website. When using base 36, all the digits 0-9 and all the letters A-Z are used. Find the decimal (base 10) equivalent of the base 36 number “CONTESTCODING”.

Remember, to solve this puzzle and appear on the leaderboard, email both your solution and your source code (in any language) to lewiscornwall13@gmail.com. Good luck!!

View all puzzles »