14 solutions

  • 0
    @ 2024-7-16 19:55:31
    #include
    #include<iomanip>
    using namespace std;
    int main(){
     double x,a,y,b;
     cin>>x>>a>>y>>b;
     double z=(b*y-a*x)/(b-a);
     cout<<fixed<<setprecision(2);
     cout<<z;
     return 0;
    }
    
    • 0
      @ 2024-7-9 16:43:03

      代码

      #include <bits/stdc++.h> using namespace std; int main(int argc, char **argv){ int x,a,y,b; scanf("%d %d %d %d",&x,&a,&y,&b); // printf("%.2f",1.0 * (y * b - (x * a)) / (b - a)); printf("%.2lf",double(y * b - (x * a)) / (b - a)); return 0; }

      
      
      • 0
        @ 2024-7-8 19:55:43

        #include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e,f; cin>>a>>b>>c>>d; e=ab; f=cd; e=(f-e)/(d-b); cout<<e<<".00";

        return 0;
        

        }

        • 0
          @ 2023-10-30 16:45:22
          #include <bits/stdc++.h>
          using namespace std;
          int main(){
              int x , y , a , b;
          	scanf("%d %d %d %d", &x , &a , &y , &b);
          	double o = (y * b - a * x) / (a - b);
          	int h = -o;
          	printf("%d.00", h); 
          	
          	return 0;
          }
          
          
          • 0
            @ 2023-10-11 13:12:45
            #include <bits/stdc++.h>
            using namespace std;
            int main(int argc, char **argv){
            	int x,a,y,b;
            	scanf("%d %d %d %d",&x,&a,&y,&b);
            	// printf("%.2f",1.0 * (y * b - (x * a)) / (b - a));
            	printf("%d.00",(y * b - (x * a)) / (b - a));
            	return 0;
            }
            

            无语了,为啥数据是整数啊?

            • 0
              @ 2023-9-16 16:45:10
              #include<iostream>
              using namespace std;
              int main(){
              	long long cao,yuan,a,b,c,d;
              	cin>>a>>b>>c>>d;
              	cao=(c*d-(a*b))/(d-b);
              	cout<<cao<<".00";
              	return 0;
              }
              
              • 0
                @ 2023-9-16 14:08:55
                ```
                #include<iostream>
                using namespace std;
                int main(){
                	long long cao,yuan,a,b,c,d;
                	cin>>a>>b>>c>>d;
                	cao=(c*d-(a*b))/(d-b);
                	cout<<cao<<".00";
                	return 0;
                }
                
                • 0
                  @ 2023-9-16 14:08:45
                  
                  

                  #include using namespace std; int main(){ long long cao,yuan,a,b,c,d; cin>>a>>b>>c>>d; cao=(cd-(ab))/(d-b); cout<<cao<<".00"; return 0; }

                  
                  
                  • -1
                    @ 2024-7-8 19:56:11

                    #include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,d,e,f; cin>>a>>b>>c>>d; e=ab; f=cd; e=(f-e)/(d-b); cout<<e<<".00";

                    return 0;
                    

                    }

                    • -1
                      @ 2023-11-24 21:26:46
                      #include<iostream>
                      #include<iomanip>
                      #include<cmath>
                      using namespace std;
                      int main(){
                          double x,a,y,b;
                          cin>>x>>a>>y>>b;
                          cout<<fixed<<setprecision(2);
                          int c=(b*y-a*x)/(b-a);
                          cout<<(double)c;
                          return 0;
                      }
                      
                      • -1
                        @ 2023-9-16 16:45:00
                        #include<bits/stdc++.h>
                        using namespace std;
                        int main(){
                        	long long cao,yuan,a,b,c,d;
                        	cin>>a>>b>>c>>d;
                        	cao=(c*d-(a*b))/(d-b);
                        	cout<<cao<<".00";
                        	return 0;
                        }
                        
                        • -3
                          @ 2023-10-1 22:21:10
                          #include<iostream>
                          #include<iomanip>.
                          
                          using namespace std;
                          int main(){
                          int x,a,y,b;
                             cin x>>a>>y>>b;
                              double n=((x*a)-(y*b))*1.0/a-b;
                             cout<<fixed<<setprecision(2)<<n;
                             
                             return 0;
                          
                          }
                          
                          • -5
                            @ 2024-7-8 19:56:07
                            #include<iostream>
                            #include<iomanip> 
                            using namespace std;
                            int main() {
                                int x,a,y,b,p,q,r;
                                cin>>x>>a>>y>>b;
                            	p=y*b-x*a;
                                q=b-a;
                                r=p/q;
                            	cout<<r<<".00";
                            	return 0;
                            }
                            
                          • -6
                            @ 2024-7-9 16:24:17

                            #新题解

                            #include<iostream>
                            #include<iomanip> 
                            using namespace std;
                            int main() {
                                double x,a,y,b,p,q,r;
                                cin>>x>>a>>y>>b;
                            	p=y*b-x*a;
                                q=b-a;
                                r=p/q;
                            	cout<<fixed<<setprecision(2)<<r;
                            	return 0;
                            }
                            
                            
                            
                            • 1

                            Information

                            ID
                            486
                            Time
                            1000ms
                            Memory
                            256MiB
                            Difficulty
                            8
                            Tags
                            # Submissions
                            534
                            Accepted
                            74
                            Uploaded By