tma2002's blog

By tma2002, history, 11 years ago, In English

Given N ( 2 < N < 1000 ) is a positive integer.

Jack had written a program to find k numbers a1,a2,a3,...ak, so as:

(a1+1) * ( a2+1 ) * .... * (ak+1) = n*a1*a2*...*ak Find the minimum k.

Example: INP: 4 OUT: 2

a1=a2=1, (1+1) * (1+1) = 2*2 = 4 = 4*a1*a2 = 4*1*1 = 4

Full text and comments »

  • Vote: I like it
  • +7
  • Vote: I do not like it