QUIZ: Calculate number of days combinations [on hold]

I would like to calculate the number of different types of days i can have that equal my set value.

For example, if someone has 30 days annual leave as part of there employment i would like to calculate what different sorts of holiday they could take.

An example would be:

5, 10, 5, 2, 2, 1, 5

As you can see the above will equal to 30.

The idea of the calculation is to give a prospective employee an idea of what sorts of days off they can take.

The returned values could also be:

10, 10, 10

This means that i need to calculate number combinations that equal to the total annual leave number.

The challenge can be completed in ANY programming langauge!


Pyth, 7 bytes


Try it online!

30 is simply too big.

Category: python Time: 2016-07-30 Views: 0
Tags: python

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.226 (s). 12 q(s)