I think this is a communications issue. If you ask them to solve it and then they clearly did, but you then say: “bUt yOu dIDn’T SoLvE iT tHe RiGht wAy”, then it is clearly your fault.
I think if you tell stuff like this upfront it is totally acceptable: “Reduce the number of digits in a given float without converting it to a String”.
Even students with previous knowledge could take this as a challenge where they learn something.