Some error occured while loading page for you. Please try again.
You are viewing a single comment's thread. Return to all comments →
I have used bc -l along with scale , still it rounds off it to 17.92857
Use a bc scale that's higher than printf's.
e.g. Use scale=4 together with printf "%.3f". Only then you'll get hackerrank's expected result.