1389N.cpp 377 B

123456789101112131415
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main() {
  4. double n;
  5. cin >> n;
  6. if(n < 1) {
  7. cout << "y=" << fixed << setprecision(2) << n << endl;
  8. } else if(n >= 1 && n < 10) {
  9. cout << "y=" << fixed << setprecision(2) << 2 * n - 1 << endl;
  10. } else {
  11. cout << "y=" << fixed << setprecision(2) << 3 * n - 11 << endl;
  12. }
  13. return 0;
  14. }