ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1864. Get-Together at Den's

What answer must be
Posted by Vitaliy Karelin 15 Oct 2011 14:39
for

100
2 1 1 1 1 ..{98 times total}.. 1 1 1 0

?

Edited by author 15.10.2011 17:09
Re: What answer must be
Posted by andy 15 Oct 2011 17:03
mine 67 32
Re: What answer must be
Posted by Vitaliy Karelin 15 Oct 2011 17:47
Any more results?
Re: What answer must be
Posted by Smilodon_am [Obninsk INPE] 15 Oct 2011 18:04
Why does the answer on this test contain only two numbers?
I think there should be 100 numbers

Edited by author 15.10.2011 18:04

Edited by author 15.10.2011 18:05
Re: What answer must be
Posted by Vitaliy Karelin 15 Oct 2011 18:11
other is 0,
Re: What answer must be
Posted by L.E.O. 15 Oct 2011 18:48
mine:
51 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Re: What answer must be
Posted by Vitaliy Karelin 17 Oct 2011 08:42
I have
50 0 0 0..{99 times}..0 0 0

Is it right?
Re: What answer must be
Posted by L.E.O. 18 Oct 2011 23:24
Vitaliy Karelin wrote 17 October 2011 08:42
I have
50 0 0 0..{99 times}..0 0 0

Is it right?
No. Answer equal 51 0 0 ... {99 times} 0

Answer:
2-100/101=102/101
98*(1-100/101)=98/101
98/101+102/101=200/101
(102/101):(200/101)=(102/101)*(101/200)=102/200
(102/200)*100=102/2=51

PS: But memoring in computer in type double 51 as 51.00000000001 or 50.999999999999999. Because you got 50, when answer 51. Wrong accuracy you got. Don't used double. Used only int, or should add epsilon (0 < epsilon < 1e-12)