15 条题解

  • 6
    @ 2022-1-17 22:45:02
    #include <iostream>
    using namespace std;
    int main(){
        double x,y;
        int n,a;
        cin>>x>>y>>n;
        a=(n*x)/y;
        cout<<a<<endl;
        return 0;
    }
    
    • 1
      @ 2025-7-8 11:13:11

      #include

      using namespace std;

      int main()

      {

      double x,y;
      
      int n,a;
      
      cin>>x>>y>>n;
      
      a=(n*x)/y;
      
      cout<<a<<endl;
      
      return 0;
      

      }

      • 1
        @ 2025-5-5 16:27:31
        #include<bits/stdc++.h>
        using namespace std;
        double n;
        double x,y;
        int main(){
        	cin>>x>>y>>n;
        	cout<<(int)((x*n)/y);
        	
        } 
        
        
        • 1
          @ 2023-8-7 19:56:08
          #include<bits/stdc++.h>
          #include<cstring>
          #include<queue>
          #include<set>
          #include<stack>
          #include<vector>
          #include<map>
          #define ll long long
          using namespace std;
          const int N=1e5+10;
          const int M=2023;
          const int inf=0x3f3f3f3f;
          double x,y,n;
          int main()
          {
          	cin>>x>>y>>n;
          	cout<<floor(x*n/y);
          	return 0;
          }
          
          

          要向下取整

          • 1
            @ 2023-6-25 13:32:07
            #include <iostream>
            #include <stdio.h>
            #include <iomanip>
            #include <math.h>
            using namespace std;
            const int N = 1e6 + 10;
            const int INF = 0x3f3f3f3f;
            int main()
            {
            	float x , y;
            	int n;
            	cin >> x >> y >> n;
            	n = (x * n) / y;
            	cout << n;
            	return 0;
            }
            
            • 0
              @ 2025-12-13 21:56:52
              #include<cstdio>
              #include<cctype>
              #include<string.h>
              #include<math.h>
              #include<cmath>
              #include<algorithm>
              using namespace std;
              int main()
              {
              	double a,b;
              	int n;
              	cin>>a>>b>>n; 
              	double bl=a*n;
              	int ans=bl/b;
              	cout<<ans;
              	return 0;
              }
              
              
              
              • 0
                @ 2025-11-28 20:10:48

                #include<bits/stdc++.h> using namespace std; int main(){ float x,y,s; cin>>x>>y>>s; float sum=s*x/y; cout<<sum; }

                • 0
                  @ 2025-11-28 20:10:42

                  #include<bits/stdc++.h> using namespace std; int main(){ float x,y,s; cin>>x>>y>>s; float sum=s*x/y; cout<<sum; }

                  • 0
                    @ 2025-11-28 20:10:30

                    #include<bits/stdc++.h> using namespace std; int main(){ float x,y,s; cin>>x>>y>>s; float sum=s*x/y; cout<<sum; }

                    • 0
                      @ 2025-11-18 22:47:04

                      #include<bits/stdc++.h> using namespace std; int main() { double x,y; long long n,a; cin>>x>>y>>n; a=x*n/y; cout<<a; return 0; }

                      • 0
                        @ 2025-10-17 20:48:04

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

                        • 0
                          @ 2025-4-4 21:22:02

                          #include using namespace std; int main(){ double x,y; int n,a; cin>>x>>y>>n; a=(n*x)/y; cout<<a<<endl; return 0; }

                          • 0
                            @ 2022-11-6 12:51:06
                            #include <bits/stdc++.h>
                            
                            using namespace std;
                            
                            int main()
                            {
                                double x, y;
                                long n;
                            
                                cin >> x >> y >> n;
                            
                                long long m = x * n / y;
                            
                                cout << m;
                            
                                return 0;
                            }
                            
                            • -1
                              @ 2023-3-4 18:32:17

                              P824 做衣服

                              image

                              这里有一个误区,setprecision(0)并不是直接舍去小数部分,而是四舍五入至个位,所以可以直接在实数结果前强转成int

                              蒟蒻のAC代码

                              #include<bits/stdc++.h>
                              using namespace std;
                              int main(){
                                  double x,y;
                                  int n;
                                  cin>>x>>y>>n;
                                  cout<<(int)(x*n/y);
                              }
                              
                              • -1
                                @ 2023-1-2 14:38:55
                                #include
                                using namespace std;
                                int main(){
                                    double x,y;
                                    int n,m;
                                	cin>>x>>y;
                                	cin>>n;
                                	m=x*n/y;
                                    cout<<m;
                                }
                                
                                • 1

                                信息

                                ID
                                824
                                时间
                                1000ms
                                内存
                                128MiB
                                难度
                                5
                                标签
                                递交数
                                1207
                                已通过
                                426
                                上传者