How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?
3 people like thisPosted: 10 years ago by Gene Belitski
While thinking on Project Euler Problem 40 solution (http://projecteuler.net/index.php?section=problems&id=40) the following subproblem has surfaced: how to glue up string presentations of a sequence members to reach a given length of result string. The snippet gives at least 3 different implementations of such function with performance comparison; as a bonus a solution to Problem 40 is given.
2 people like thisPosted: 10 years ago by Gene Belitski
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation: 1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p). It is possible to make £2 in the following way: 1x£1 + 1x50p + 2x20p + 1x5p + 1x2p + 3x1p How many different ways can £2 be made using any number of coins?
3 people like thisPosted: 10 years ago by Gene Belitski