4 条题解

  • 0
    @ 2025-4-6 16:26:02

    #include <iostream> #include<string> using namespace std; int main() { int q,s; cin>>q>>s; m=s/q*100; cout<<m<<"%"<<endl; return 0; }

    • 0
      @ 2025-3-21 10:52:02
      #include<iostream>
      #include<iomanip>
      using namespace std;
      int main(){
          int q,s;
          cin>>q>>s;
          double l=static_cast<double>(s)/q*100;
          cout<<fixed<<setprecision(3)<<l<<"%"<<endl;
          
      }
      
      • 0
        @ 2025-3-7 13:55:41
        #include <bits/stdc++.h>
        using namespace std;
        
        int main()
        {
            double a,b,c;
            cin >> a >> b;
            c = b / a * 100; //扩大100倍
            cout << fixed << setprecision(3) << c << "%" << endl;
            return 0;
        }
        
        • 0
          @ 2024-4-20 22:57:02

          #include<stdio.h> int main(){ float i,j; float k=0; scanf("%f %f",&i,&j); k=j*100/i; printf("%.3f",k); printf("%%"); return 0; }

          • 1

          信息

          ID
          23
          时间
          1000ms
          内存
          256MiB
          难度
          4
          标签
          递交数
          89
          已通过
          40
          上传者