10499 - The Land of Justice

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

Moderator: Board moderators

osan
New poster
Posts: 47
Joined: Tue Jul 29, 2003 12:03 pm
Location: Bangladesh,Dhaka.
Contact:

critical input

Post by osan » Sat Nov 01, 2003 4:15 pm

bery olivier you should think about critical inputs. I think you are getting WA for critical inputs.

dark man
New poster
Posts: 7
Joined: Fri Mar 26, 2004 11:07 pm
Contact:

10499_inputs needed

Post by dark man » Tue Mar 30, 2004 9:17 pm

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.
Try hard . May be you will get the right answer.

User avatar
shamim
A great helper
Posts: 498
Joined: Mon Dec 30, 2002 10:10 am
Location: Bozeman, Montana, USA

Post by shamim » Wed Mar 31, 2004 12:45 pm

check your answer for 1.
It should be 0%.

dark man
New poster
Posts: 7
Joined: Fri Mar 26, 2004 11:07 pm
Contact:

Post by dark man » Thu Apr 01, 2004 8:01 pm

Can anybody give the outputs of the following inputs

500
1000
200
100
50
1
21781920
10
5
-1
Try hard . May be you will get the right answer.

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post by Dominik Michniewski » Thu Apr 01, 2004 8:45 pm

12500%
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)

dark man
New poster
Posts: 7
Joined: Fri Mar 26, 2004 11:07 pm
Contact:

Post by dark man » Thu Apr 01, 2004 9:37 pm

thank you dominic ,
i got some mistakes with my equation. But i have fixed it and got accepted. But i think u have done a printing mistake with the input 5.
Output should be 125%.
Try hard . May be you will get the right answer.

Dominik Michniewski
Guru
Posts: 834
Joined: Wed May 29, 2002 4:11 pm
Location: Wroclaw, Poland
Contact:

Post by Dominik Michniewski » Fri Apr 02, 2004 12:25 pm

yes, sorry it was typo .... I corrected it ...

Best regards
DM
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)

User avatar
_.B._
Experienced poster
Posts: 160
Joined: Sat Feb 07, 2004 7:50 pm
Location: Venezuela
Contact:

10499 > The Land of Justice > Help with formula.

Post by _.B._ » Sun Apr 18, 2004 12:54 am

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 :o
Thanks in advance!.
_.

User avatar
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey » Sun Apr 18, 2004 8:36 am

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 :wink:

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.

User avatar
_.B._
Experienced poster
Posts: 160
Joined: Sat Feb 07, 2004 7:50 pm
Location: Venezuela
Contact:

AC!.

Post by _.B._ » Sun Apr 18, 2004 9:29 am

Greetings!.
Thanks little joey!.
Got ACed!.
Really usefull explanation.
Keep posting!.
_.

Noim
Learning poster
Posts: 88
Joined: Sun Oct 13, 2002 6:11 am
Location: Bangladesh

Post by Noim » Thu Apr 29, 2004 8:25 am

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....

User avatar
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey » Thu Apr 29, 2004 9:38 am

Every time you make a cut through the sphere, the area increases by two times the area of the circle (one for every side of the cut). So cutting twice, as in the example I gave, increases the area by four times the area of the circle. If you don't believe me, take an apple and make the cuts :D

Noim
Learning poster
Posts: 88
Joined: Sun Oct 13, 2002 6:11 am
Location: Bangladesh

Post by Noim » Thu Apr 29, 2004 9:53 am

You are given a sequence of integers N (0 < N < 231), indicating the numbers of parts of the sphere.
does N means how many cuts or how many parts?

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....

User avatar
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey » Thu Apr 29, 2004 10:13 am

This makes me look stupid, doesn't it? It means parts, not cuts, something I was convinced of...

Forget all of my previous postings. They are wrong. Sorry to the problemsetter. But at least _.B._ got accepted... :oops: :( :cry: :( :oops:

Noim
Learning poster
Posts: 88
Joined: Sun Oct 13, 2002 6:11 am
Location: Bangladesh

Post by Noim » Thu Apr 29, 2004 11:41 am

that does not matter boss. :D

yeh _.B._ have got acc for your post..... :)

i like your apple theory :wink:
__nOi.m....

Post Reply

Return to “Volume 104 (10400-10499)”