10499 - The Land of Justice
Moderator: Board moderators
critical input
bery olivier you should think about critical inputs. I think you are getting WA for critical inputs.
10499_inputs needed
can anybody help me giving some normal & crical inputs with their outputs
of problem 10499.I don't understand what they mean with
" calculate the profit over the sold price". I solved this problem but got WA. May be i didn't understand the problem.
of problem 10499.I don't understand what they mean with
" calculate the profit over the sold price". I solved this problem but got WA. May be i didn't understand the problem.
Try hard . May be you will get the right answer.
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
12500%
25000%
5000%
2500%
1250%
0%
544548000%
250%
125%
Best regards
DM
25000%
5000%
2500%
1250%
0%
544548000%
250%
125%
Best regards
DM
Last edited by Dominik Michniewski on Fri Apr 02, 2004 12:25 pm, edited 1 time in total.
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
Born from ashes - restarting counter of problems (800+ solved problems)
-
- Guru
- Posts: 834
- Joined: Wed May 29, 2002 4:11 pm
- Location: Wroclaw, Poland
- Contact:
10499 > The Land of Justice > Help with formula.
Greetings!.
Will anyone please tell me what's wrong with my formula?.
Considering the graphic in the example, each Nth piece will have 2 halves of Area of a Circle, and Area of the Sphere / N.
Considering that
Area of a Circle (AC) = Pi*r^2, and
Area of the Sphere (AS) = 4*Pi*r^2 = 4*AC
[ AC = AS/4 ]
then, for each Nth piece, there will be a total Surface of:
2*(AC/2) + AS/N = AC + AS/N
For N pieces, there will be a total Surface of:
N*(AC + AS/N) = N*AC + AS
Now, for the profit:
AS -- 100%
N*AC + AS -- ?%
Therefore, Profit = [(N*AC + AS) * 100] / AS
Profit = [(N*AS/4 + AS) * 100] / AS = [AS*(N/4 + 1)*100]/AS
Profit = (N/4 + 1)*100
Profit = 25*N + 100
And that won't show the right answer
Thanks in advance!.
Will anyone please tell me what's wrong with my formula?.
Considering the graphic in the example, each Nth piece will have 2 halves of Area of a Circle, and Area of the Sphere / N.
Considering that
Area of a Circle (AC) = Pi*r^2, and
Area of the Sphere (AS) = 4*Pi*r^2 = 4*AC
[ AC = AS/4 ]
then, for each Nth piece, there will be a total Surface of:
2*(AC/2) + AS/N = AC + AS/N
For N pieces, there will be a total Surface of:
N*(AC + AS/N) = N*AC + AS
Now, for the profit:
AS -- 100%
N*AC + AS -- ?%
Therefore, Profit = [(N*AC + AS) * 100] / AS
Profit = [(N*AS/4 + AS) * 100] / AS = [AS*(N/4 + 1)*100]/AS
Profit = (N/4 + 1)*100
Profit = 25*N + 100
And that won't show the right answer

Thanks in advance!.
_.
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
No.
In this problem they want you to calculate the profit as percentage of the sell price, not the buy price. I guess the problemsetter is better in mathematics than in economics
So for the case n=2:
Buy price B = AS
Sell price S = AS + 4*AC = 2*AS
Profit P = 100*(S - B)/S = 100*(2*AS - AS)/(2*AS) = 50%
As in the problem description.
In normal life the answer would be 100% because the sell price is twice the buy price, but in this case the problemsetter is king. But he could have mentioned it in the description.
In this problem they want you to calculate the profit as percentage of the sell price, not the buy price. I guess the problemsetter is better in mathematics than in economics

So for the case n=2:
Buy price B = AS
Sell price S = AS + 4*AC = 2*AS
Profit P = 100*(S - B)/S = 100*(2*AS - AS)/(2*AS) = 50%
As in the problem description.
In normal life the answer would be 100% because the sell price is twice the buy price, but in this case the problemsetter is king. But he could have mentioned it in the description.
little joey,
After Accpeting this problem , i see this post and i am ashtonished. Because my accepted code calculate the profit as percentage of the buying price
and my formula almost same as _.B._ described. only differece is that _.B._ calculate the percectage of not only profit but also with it's buying price. that's the reason his all answer is 100% greater than me.
i may be used totally wrong formula. But what was the significant of your 4 time multiplication with AC of your formula little joey.
After Accpeting this problem , i see this post and i am ashtonished. Because my accepted code calculate the profit as percentage of the buying price
and my formula almost same as _.B._ described. only differece is that _.B._ calculate the percectage of not only profit but also with it's buying price. that's the reason his all answer is 100% greater than me.
i may be used totally wrong formula. But what was the significant of your 4 time multiplication with AC of your formula little joey.
Buy price B = AS
Sell price S = AS + 4*AC = 2*AS
__nOi.m....
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
does N means how many cuts or how many parts?You are given a sequence of integers N (0 < N < 231), indicating the numbers of parts of the sphere.
i think you explained it assuming N as cuts.
if n means how many parts?? then what should be the explanation?
i may still wrong.
please clear it to me.[/quote]
__nOi.m....
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm