/A-List-Game

Spotify Challenge 2010

Primary LanguagePython

A-List-Game

Spotify Challenge 2010

You are playing the following simple game with a friend: The first player picks a positive integer X

The second player gives a list of k positive integers Y1,…,Yk such that (Y1+1)(Y2+1)⋯(Yk+1)=X, and gets k points.

Write a program that plays the second player.

Input

The input consists of a single integer X satisfying 103≤X≤109, giving the number picked by the first player.

Output

Write a single integer k, giving the number of points obtained by the second player, assuming she plays as good as possible.

I have written this piece of code in python3