4 条题解

  • 2
    @ 2023-9-16 7:59:21

    Python

    a=float(input())
    if a<=1000:
        w=a*0.95
    else:
        w=950+(a-1000)*0.9
    print("%.2f"%w)
    
    • 1
      @ 2023-9-29 14:05:02

      Python的哦~

      x=float(input())
      if x<1000:
          print(x*0.95)
      else:
          print(round(950+(x-1000)*0.9,2))
      
      • 1
        @ 2023-7-16 20:21:22
        #include <iostream>
        
        using namespace std;
        
        int main()
        {
            double a,b;
            cin>>a;
            if(a<=1000){
                b=0.95*a;
                printf("%.2f",b);
            }else{
                b=950+0.9*(a-1000);
                printf("%.2f",b);
                }
            return 0;
        }
        
        
        • 1
          @ 2023-7-14 19:53:34

          #include <iostream>

          using namespace std;

          int main() { float a,w; cin>>a; if(a<=1000){ w=0.95*a; printf("%.2f",w); } else{ w=950 + (a-1000.00)*0.90; cout<<w; };

          return 0;
          

          }

          • 1

          信息

          ID
          19
          时间
          1000ms
          内存
          128MiB
          难度
          5
          标签
          递交数
          2159
          已通过
          837
          上传者