5 条题解

  • 4
    @ 2023-8-31 14:52:31

    //您的外卖到了,记得五星好评👍

    #include <bits/stdc++.h>
    using namespace std;
    int main(){
        int n, g , s , b;
        cin >> n;
        double a;
        b = n / 100 % 10;
        s = n / 10 % 10;
        g = n % 10;
        if(b != 0&&s != 0&&g != 0)
        {
            a = (b + s) / (s + g);
            cout << fixed << setprecision(2) << a;
        }
        return 0;
    }
    
    • 2
      @ 2023-8-24 11:00:43

      过辣!(脑残人士的欢呼)

          long long n,a,b,c;
          cin>>n;
          a=n/100;
          n-=a*100;
          b=n/10;
          c=n%10;
          cout<<fixed<<setprecision(2)<<1.0*(a+b)/(b+c);
      
      • 1
        @ 2022-12-23 15:32:16
        #include <iostream>
        #include <iomanip>
        using namespace std;
        int main()
        {
        	int a;
        	cin >> a;
            double num1 = a / 100;
            double num2 = a % 100 / 10;
            double num3 = a % 10;
        	cout << fixed << setprecision(2) << (num1 + num2) / (num2 + num3);
            return 0;
        }
        
        • 0
          @ 2023-10-28 19:04:23
          #include <cstdio>
          using namespace std;
          int main(){
              int n,x,y,z;
              scanf("%d",&n);
              x=n/100,y=n/10-10*x,z=n%10;
              printf("%.2f\n",1.0*(x+y)/(y+z));
              return 0;
          }
          
          • 0
            @ 2023-8-17 22:16:08
            #include <bits/stdc++.h>
            using namespace std;
            int main()
            {
                cout<<"2.00";
                return 0;
            }
            
            
          • 1

          信息

          ID
          605
          时间
          1000ms
          内存
          64MiB
          难度
          3
          标签
          递交数
          294
          已通过
          165
          上传者