10490  Mr. Azad and his Son!!!!!
Moderator: Board moderators
10490  Mr. Azad and his Son!!!!!
Why WA ?
[c] Now, I get AC[/c]
Thank you , red Scorpion
[c] Now, I get AC[/c]
Thank you , red Scorpion
Last edited by pingus on Wed Aug 13, 2003 4:17 pm, edited 1 time in total.

 Experienced poster
 Posts: 192
 Joined: Sat Nov 30, 2002 5:14 am

 Experienced poster
 Posts: 192
 Joined: Sat Nov 30, 2002 5:14 am
hi pingus,
are you sure you are getting WA for this program.
i got accepted using your program without changing anything.
Submit this program with omatic page(http://acm.uva.es/problemset/submit.php)
and then observe the result.
may be WA for your mailing problem.
are you sure you are getting WA for this program.
i got accepted using your program without changing anything.
Submit this program with omatic page(http://acm.uva.es/problemset/submit.php)
and then observe the result.
may be WA for your mailing problem.
__nOi.m....
10490:Mr Azad
This is going to be a spoiler !
except for 11 23 and 29 i am calculating the rest
using the formula .
am i wrong ??
please help
except for 11 23 and 29 i am calculating the rest
using the formula .
am i wrong ??
please help
10490
Hi, could somebody please explain problem 10490 to me?!
The OJ returns WA!
As I understood the problem the output is as follows
("n: " added for clarity)
2: Perfect: 6!
3: Perfect: 28!
5: Perfect: 496!
7: Perfect: 8128!
13: Perfect: 33550336!
17: Perfect: 8589869056!
19: Perfect: 137438691328!
31: Perfect: 2305843008139952128!
For any other input n (2 <= n <= 31) a perfect number does not exist!
Output is then either
"Given number is NOT prime! NO perfect number is available."
or
"Given number is prime. But, NO perfect number is available."
One can compute a perfect number from 2^(n1) * (2^n  1)
if (2^n  1) is prime and n is prime (proof by Euclid, as far
as I know).
Well that equation holds for EVEN perfect numbers, but I don't really think
that's my problem (just a joke).
Probably one of my usual silly mistakes but where?
The OJ returns WA!
As I understood the problem the output is as follows
("n: " added for clarity)
2: Perfect: 6!
3: Perfect: 28!
5: Perfect: 496!
7: Perfect: 8128!
13: Perfect: 33550336!
17: Perfect: 8589869056!
19: Perfect: 137438691328!
31: Perfect: 2305843008139952128!
For any other input n (2 <= n <= 31) a perfect number does not exist!
Output is then either
"Given number is NOT prime! NO perfect number is available."
or
"Given number is prime. But, NO perfect number is available."
One can compute a perfect number from 2^(n1) * (2^n  1)
if (2^n  1) is prime and n is prime (proof by Euclid, as far
as I know).
Well that equation holds for EVEN perfect numbers, but I don't really think
that's my problem (just a joke).
Probably one of my usual silly mistakes but where?
the problemsetter is sucks
in this problem u can get AC in short time by handle 6 perfect number as special case && primes less than 32.
)
)
this time WA
what next...............?
what next...............?
Thanks for the post Osan,
but the riddle remains.
1) If the formula from my original post is correct, then only
primes generate perfect numbers.
2) Considering the primes up to 31, 11, 23 and 29 are primes
that do not generate a perfect number.
So the output for all integers between 2 and 31 should be
In my opinion that should be ok and the answer to the problem.
What do you mean by 6 perfect numbers as special cases?
but the riddle remains.
1) If the formula from my original post is correct, then only
primes generate perfect numbers.
2) Considering the primes up to 31, 11, 23 and 29 are primes
that do not generate a perfect number.
So the output for all integers between 2 and 31 should be
Code: Select all
Perfect: 6!
Perfect: 28!
Given number is NOT prime! NO perfect number is available.
Perfect: 496!
Given number is NOT prime! NO perfect number is available.
Perfect: 8128!
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is prime. But, NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Perfect: 33550336!
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Perfect: 8589869056!
Given number is NOT prime! NO perfect number is available.
Perfect: 137438691328!
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is prime. But, NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is prime. But, NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Perfect: 2305843008139952128!
What do you mean by 6 perfect numbers as special cases?
Hi, WR !
Your output seems OK to me.
Compare it once again with my output ( the output
from an ACC program ).
Just one question  what is your output for N=1 ?
I know they say N>1 but I handle the case N=1 too.
The output below is for an input file containing 32 lines.
On the first 31 lines I have the consequent numbers 1,2,3...,31.
On the 32nd line I have the number 0.
Code: Select all
Given number is NOT prime! NO perfect number is available.
Perfect: 6!
Perfect: 28!
Given number is NOT prime! NO perfect number is available.
Perfect: 496!
Given number is NOT prime! NO perfect number is available.
Perfect: 8128!
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is prime. But, NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Perfect: 33550336!
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Perfect: 8589869056!
Given number is NOT prime! NO perfect number is available.
Perfect: 137438691328!
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is prime. But, NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Given number is prime. But, NO perfect number is available.
Given number is NOT prime! NO perfect number is available.
Perfect: 2305843008139952128!
Good Help
Yeh Sedefcho
You Are Right I do the Same & Got ACC..
Thanks.
You Are Right I do the Same & Got ACC..
Thanks.