#include <stdio.h> int main( void ) { for( unsigned long long n; scanf("%llu",&n)==1; ) { if( n%10 >= 5 ) n += 10; printf( "%llu.%02llu\n", n/1000, n%1000/10 ); } }
#include<iostream> #include<functional> #include<iomanip> using namespace std; unsigned long long int a; int main(void){ double b; while(cin>>a){ b=(double)a; b/=1000; cout<<fixed<<setprecision(2)<<b<<endl; } return 0; }
[此贴子已经被作者于2018-12-15 00:10编辑过]