6 条题解

  • 2
    @ 2023-10-21 19:50:39
    #include <bits/stdc++.h> 
    using namespace std;
    int main()
    {
        int a, b, c;
        cin >> a >> b >> c;
        cout << a * 0.2 + b * 0.3 + c * 0.5;
        return 0;
    }
    
    • 2
      @ 2023-10-17 20:29:24

      没啥可说的了,看注释吧

      
      #include <bits/stdc++.h>
      using namespace std;
      double a,b,c;
      int main()
      {
      int sum=0;
      cin>>a>>b>>c;
      a=a*0.2;//50%=100分之50=10分之5
      b=b*0.3;//30%=100分之30=10分之3
      c=c*0.5;//20%=100分之20=10分之2
      sum=a+b+c;
      cout<<sum;
      return 0;//完美结束
      }
      
      ```
      
      ```
      • 1
        @ 2023-10-12 21:56:32

        习惯性写函数

        #include<bits/stdc++.h>
        using namespace std;
        int homework,test,examinstion;
        int mark(int a,int b,int c)
        {
            int sum = 0;
            sum = a*0.2 + b*0.3 + c*0.5;
            return sum;
        }
        int main()
        {
            cin>>homework>>test>>examinstion;
            cout << mark(homework,test,examinstion);
            return 0;
        }
        
        • 0
          @ 2023-9-7 19:59:02
          #include<bits/stdc++.h>
          using namespace std;
          int main()
          {
              int n , a , b  , c;
              cin >> a >> b >> c;
              a *= 0.2;
              b *= 0.3;
              c *= 0.5;
              n = a + b + c;
              cout << n;
              return 0;
          }
          

          A

          • 0
            @ 2023-9-1 8:10:50

            泰裤辣!!!👍

            #include <bits/stdc++.h>
            using namespace std;
            int main(){
                int a,b,c,x;
                cin >> a >> b >> c;
                x = a * 0.2 + b * 0.3 + c * 0.5;
                cout << x;
                return 0;
            }
            
            • 0
              @ 2023-5-23 17:47:55
              #include <bits/stdc++.h>
              using namespace std;
              double a, b, c;
              int main()
              {
                  cin >> a >> b >> c;
                  a *= 0.2; //20% = 0.2
                  b *= 0.3; //30% = 0.3
                  c *= 0.5; //50% = 0.5
                  cout << a + b + c; //输出总和
                  return 0;
              }
              
              • 1

              信息

              ID
              1381
              时间
              1000ms
              内存
              256MiB
              难度
              3
              标签
              递交数
              820
              已通过
              421
              上传者