fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n;
  7. scanf("%d",&n);
  8. if(n>=1000)n=50000+(n-1000)*100;
  9. else n = ((n/100)*5)*n;
  10. printf("%d.%02d",n/100,n%100);
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5464KB
stdin
1010
stdout
510.00