 # SEAVOTE - Editorial

you are a genius!

4 Likes

I tried something like this, but this created problems as I used comparisons with float and double variables. But then the fact that “it is the second question of the contest with so many submissions”, I just thought the only thing that I am not given any decimal precision value. It can be any number of digits after decimal and thus I’ll be able to make 100 if possible as per the sum. So, I thought the below thing(my answer below).

I implemented the exact same thing. Kudos!

1 Like

this should be the easiest method

this was the best explaination.
thanks @starks007

the logic is so straight forward, if an element is zero you cannot convert into any A element because, then it would be rounded to next number, therefore just neglect the zero element and then just sum the rest and divide the extra score among the numbers and if could be divided then, A array is possible else not…

11 * 10 = 110

10 / 11 = 0.90909090909

10 - 0.90909090909 = 9.09090909091

9.09090909091 * 11 = 10011 * 10 = 110

10 / 11 = 0.90909090909

10 - 0.90909090909 = 9.09090909091

9.09090909091 * 11 = 100