Page 2 of 2

Re: 11105 - Semi-prime H-numbers

Posted: Sat Jul 11, 2009 10:17 am
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. :)

Re: 11105 - Semi-prime H-numbers

Posted: Mon Aug 29, 2011 12:26 pm
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

10
100
1000
10000
100000
1000000
0

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.