project_euler.problem_076.sol1¶
Counting Summations Problem 76: https://projecteuler.net/problem=76
It is possible to write five as a sum in exactly six different ways:
4 + 1 3 + 2 3 + 1 + 1 2 + 2 + 1 2 + 1 + 1 + 1 1 + 1 + 1 + 1 + 1
How many different ways can one hundred be written as a sum of at least two positive integers?
Functions¶
|
Returns the number of different ways the number m can be written as a |
Module Contents¶
- project_euler.problem_076.sol1.solution(m: int = 100) int ¶
Returns the number of different ways the number m can be written as a sum of at least two positive integers.
>>> solution(100) 190569291 >>> solution(50) 204225 >>> solution(30) 5603 >>> solution(10) 41 >>> solution(5) 6 >>> solution(3) 2 >>> solution(2) 1 >>> solution(1) 0