3 条题解

  • 1
    @ 2022-8-11 19:49:02

    #include <bits/stdc++.h> using namespace std; int n; int main() { cin>>n; if(n<=30) printf("%.2lf",n0.2); else if(n>30 && n<=60) printf("%.2lf",300.2+(n-30)*0.6); else cout<<"NO"; return 0; }

    • 1
      @ 2022-5-28 16:43:50
      using namespace std;
      int main()
      {
        double a,b,c;
        cin>>a;
        if(a<=30){
        	cout << fixed << setprecision(2) << a*0.2 << endl;
        }else if(a>30 and a<=60){
        	cout << fixed << setprecision(2) << (a-30)*0.6+6 << endl;
        }else if(a>60){
        	cout<<"NO"<<endl;
        }
        return 0;
      }
      

      洒家打破了五五开的局面╰(°▽°)╯

      上过初中的都会做吧

      • 0
        @ 2022-8-15 19:53:33
        using namespace std;
        int main()
        {
          double a,b,c;
          cin>>a;
          if(a<=30){
          	cout << fixed << setprecision(2) << a*0.2 << endl;
          }else if(a>30 and a<=60){
          	cout << fixed << setprecision(2) << (a-30)*0.6+6 << endl;
          }else if(a>60){
          	cout<<"NO"<<endl;
          }
          return 0;
        }
        
        
        • 1

        信息

        ID
        24
        时间
        1000ms
        内存
        256MiB
        难度
        5
        标签
        递交数
        133
        已通过
        56
        上传者