problem statement: https://codeforces.me/contest/1886/problem/B
my entry: https://codeforces.me/contest/1886/submission/323127501
passed the 1st test case in vs code, printing correct output in vs code but output in code forces is either -0.000... or 0.000.... how can i avoid this?








I think you should use a newer compiler (like G++23).
what should i do to make it work on codeforces?
When you submit, select the newer compiler. Your submission above used GNU GCC 11, which was the oldest available.