// archives

Python

This tag is associated with 157 posts

Project Euler 231 Solution

The prime factorisation of binomial coefficients

Project Euler 455 Solution

Powers With Trailing Digits

Panmagic (Pandiagonal) and magic square generation, testing

Magic Squares While working on an idea for maximizing a return on a financial portfolio using magic squares, we though we would share our Python code in case someone else may have some use for it. import string def make_magic_square(n): if n < 1 or n == 2: return False if n % 2 == […]

SPOJ Problem 1682. Deli Deli (DELI) Solution

Make plurals of English words from the given input

SPOJ Problem 4408. Build a Fence (FENCE1) Solution

Build a fence to maximize an area enclosed between the fence and a fixed wall

SPOJ Problem 42. Adding Reversed Numbers (ADDREV)

Add two reversed numbers and output their reversed sum

SPOJ Problem 11. Factorial (FCTRL) Trailing zeros in factorials

Find the number of trailing zeros in a factorial

SPOJ Problem 1681. Cylinder Volume (CYLINDER) Solution

Find the largest volume of a cylinder cut and formed from a sheet of paper

SPOJ Problem 1680. Black and white painting (BLACK)

How many 8 × 8 chess boards are embedded in a painting which consists solely of black and white squares, arranged in a checkered pattern

Project Euler 205 Solution

Comparing four-sided and six-sided dice