19 - Fine Tuning

Back to Topic List

aszaloki     2024-08-30 09:43:39

Hi Kevin!

Sorry to bother you again, I found some problem in this problem too.

1) First of all although it is very little error: order of the input parameters in the example and test case is not the same. In the example first parameter is the frequency of A4, then comes the number of cases while in the test cases number of cases is the first, frequency of A4 is the second parameter.

2) Again, I have problems about the accuracy. I checked the example results with calculator and th first case should be 10,779657934856960136603955238652 and it is not the same (even with rounding) as in the example answer (10,778) Therefore here the checker denies my solution again :) Could you please check the checker and the method of calculations (and also mine) what could be the problem?

Thaks a lot!

admin (Kevin)     2024-08-30 16:01:49
User avatar

Hi Adam!

You are correct - it looks like the checker here was doing some "creative" logic to get around the rounding issues we discussed in the other thread, causing inaccuracy. Everything should be fixed now!

Thanks!

aszaloki     2024-08-30 16:33:00

Ok, it works fine, thanks! (I found a little mistake in my code, just to make you feel a little bit better :) - I checked only the first 12 notes when searching the closest but in the case when the input fall between two octaves (I mean when measured frequency is greater than the 12th note of first octave but less than then the 1st note of the following octave, I chose the wrong value) So congrats for the test data, it covers a rare case :)

Thanks!

Please login and solve 5 problems to be able to post at forum