Page 1 of 3
11086 - Composite Prime
Posted: Sun Sep 10, 2006 7:41 am
by Sumon
After long time i got a number theory problem with such an undefined statement like "N integers are positive-natural numbers". What does natural number means? Shall we try upto INFINITY?? Would you please tell me what would be the trouble if you had specified it with specific number. By the way i got this problem accepted and still confused about it's data range. Pathetic?!!?
Posted: Sun Sep 10, 2006 9:53 am
by sclo
I'm pretty sure the input numbers are less than 5,000,000
Otherwise my program will crash.
Posted: Sun Sep 10, 2006 10:21 am
by little joey
The capital letter N is used in three different ways in this problem:
the set of natural numbers is normally denoted by N
First line of each test case contains one integer N.
Constraints
- N ≤ 2^20
Al three are different, and the last one is
not the number of input values per case, but the input value itself.
At least that is how I interpret it, and I got AC with it....
Posted: Sun Sep 10, 2006 3:58 pm
by Martin Macko
little joey wrote:Al three are different, and the last one is not the number of input values per case, but the input value itself.
At least that is how I interpret it, and I got AC with it....
Despite I've interpreted it in the same way finally, imho the problem statement says something different

need some explaination
Posted: Sun Sep 10, 2006 3:59 pm
by Rocky
i cant understand the problem..
can any one explain it with i/o ... plssss it will help mee
thank's in advance
rocky
Re: need some explaination
Posted: Sun Sep 10, 2006 4:05 pm
by Martin Macko
Rocky wrote:i cant understand the problem..
can any one explain it with i/o ... plssss it will help mee
I can give you an example of few first composite primes:
4,
6,
9,
10,
14, ...
The numbers
1,
2,
3,
5,
7,
11,
13 are not composite, therefore they are not composite primes. The numbers
8 and
12 have nontrivial composite divisors (eg.
4), so they are not composite primes, too.
help again
Posted: Sun Sep 10, 2006 4:14 pm
by Rocky
thank's for reply]
actually i want the explain with the problem i/o...
can you help plsss with the problem i/o..
thank's in advance
rocky
soory
Posted: Sun Sep 10, 2006 4:19 pm
by Rocky
ahh got it ... i think more deeply for this and in another way it is simpleee..
thanks
rocky
Posted: Sun Sep 10, 2006 4:44 pm
by Vexorian
I barely could have 9 secons there, I think the problem should state an actual limit so we would now if we could use a table or something.
Posted: Sun Sep 10, 2006 8:36 pm
by Shahidul Islam (SUST)
little joey wrote:The capital letter N is used in three different ways in this problem:
the set of natural numbers is normally denoted by N
First line of each test case contains one integer N.
Constraints
- N ≤ 2^20
Al three are different, and the last one is
not the number of input values per case, but the input value itself.
At least that is how I interpret it, and I got AC with it....
Thank you little joey. May be i am not good at guessing and solved this problem for data range 2^31-1. Your assumtion allowed me to get accepted in time 1.182 sec.
Posted: Mon Sep 11, 2006 7:49 am
by rabby
You have to find the Composite Prime for M. M is the Subset of N. N is the set of natural number and N<=2^20.
So what it means:: Test case is N (Natural number and <=2^20). Then following N integers are positive-natural numbers (difference between positive-natural numbers and natural numbers is '0'). So all N input values are positive natural numbers means greater than 0 and less then or equal to N (N<=2^20).
[quote]
confused
Posted: Mon Sep 11, 2006 2:00 pm
by vinay
can someone explain what elements come in the set, I can't figure out the symbol between x and y , is it multiplication????
A number m is a member of M if m = x*y where x > 1 and y > 1. Both x and y are natural numbers.

Posted: Mon Sep 11, 2006 2:56 pm
by rabby
Yeah!! *=Multiplication

Posted: Mon Sep 11, 2006 3:43 pm
by vinay
sorryy... i misunderstood the statement...

Posted: Mon Sep 11, 2006 4:57 pm
by vinay
ca anybody explain the answer for the answer for the first test case
