#include <stdio.h>

int main()
{
    float f;
    scanf("%f",&f);
    printf("%.3f",f);
    return 0;
}

其实考点就是保留3位小数,这个只需要在打印的时候在%后加.3即可