11105 - Semi-prime H-numbers

All about problems in Volume 111. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

New poster
Posts: 7
Joined: Thu Jul 02, 2009 6:37 pm

Re: 11105 - Semi-prime H-numbers

Post by liauys »

sazzadcsedu wrote:how to determine a particular number is only multiple of 2 number!!!
plz some give me some idea;
i remove number containing more than 2-(5,9,13,17.....)
but cant handle case like:-5*117=(5*9*17).
how to handle them?????
If the number is a multiple of two h-primes, then it can't be a multiple of more than two h-primes, right? So what you can do is to generate the semi-primes out of the h-primes. :)
Experienced poster
Posts: 150
Joined: Fri May 06, 2011 11:37 am

Re: 11105 - Semi-prime H-numbers

Post by plamplam »

Uvatoolkit's output for this problem is wrong. Don't get confused if you try it. Here are some inputs:

Code: Select all


Code: Select all

10 0
100 5
1000 82
10000 980
100000 10394
1000000 105752
You can use sth like sieve and modify it to fit the definition of H numbers. I got Accepted in 0.020s.
You tried your best and you failed miserably. The lesson is 'never try'. -Homer Simpson
Post Reply

Return to “Volume 111 (11100-11199)”