5 条题解

  • 0
    @ 2024-11-5 13:46:50

    #include<bits/stdc++.h> using namespace std; int main() { double x,y,a; cin>>x>>y; a=(87x+85y)/(x+y); cout<<fixed<<setprecision(2)<<a<<endl; return 0; }

    • 0
      @ 2024-11-5 13:35:05

      #include<bits/stdc++.h> using namespace std; int main () { double x,y; cin>>x>>y; cout<<fixed<<setprecision(2)<<(x87+y85)/(x+y); return 0; }

      • 0

        思路

        根据平均分计算公式可知,答案为:

        (x×87.0+y×85.0)/(x+y)(x \times 87.0+y \times 85.0)/(x+y)

        code

        #include<bits/stdc++.h>
        using namespace std;
        int main(){
           int x,y;
           cin>>x>>y;
           printf("%.2lf",(x*87.0+y*85.0)/(x+y));
           return 0;
        }
        
        • 0
          @ 2023-12-24 12:52:02
          #include<bits/stdc++.h>
           using namespace std; 
          double x,y;
          int main() 
          { cin>>x>>y;
           cout<<fixed<<setprecision(2)<<(87.00*x+85.00*y)/(x+y);
           return 0; 
          }
          
          • -1
            @ 2023-12-22 13:55:21

            #include<bits/stdc++.h> using namespace std; double x,y; int main() { cin>>x>>y; cout<<fixed<<setprecision(2)<<(87x+85y)/(x+y); return 0; }

            • 1

            信息

            ID
            9
            时间
            1000ms
            内存
            256MiB
            难度
            5
            标签
            递交数
            327
            已通过
            138
            上传者