15 条题解

  • 1
    @ 2023-1-23 16:02:33
    #include <iostream>
    #include <math.h>
    using namespace std;
    int main(){
    	double a,b,c;
    	cin>>a>>b>>c;
    	double p=(a+b+c)/2;
    	double S=sqrt(p*(p-a)*(p-b)*(p-c));
    	printf("%.2f",S);
    	return 0; 
    }
    
    
    • 1
      @ 2022-11-12 12:01:49
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          double a,b,c;
          cin >> a >> b >> c;
          double p = (a + b + c)/2;
          double sum = p * (p-a)*(p-b)*(p-c);
          sum = sqrt(sum);
          printf("%.2lf\n",sum);
      }
      
      • 1
        @ 2022-11-4 21:58:25
        #include <bits/stdc++.h>
        
        using namespace std;
        
        int main()
        {
        	double a, b, c, p, m;
        
        	cin >> a >> b >> c;
        
        	p = (a + b + c) / 2;
        
        	m = p * (p - a) * (p - b) * (p - c);
        
        	cout << fixed << setprecision(2) << sqrt(m);
        
        	return 0;
        }
        
        • 0
          @ 2024-8-6 16:19:41

          #include<iostream> #include<iomanip> #include<cmath> using namespace std; double a, b, c, p, m; int main() { cin >> a >> b >> c; p = (a + b + c) / 2; m = p * (p - a) * (p - b) * (p - c); cout << fixed << setprecision(2) << sqrt(m); return 0; }

          • 0
            @ 2024-8-6 16:19:27

            #include<iostream> #include<iomanip> #include<cmath> using namespace std; double a, b, c, p, m; int main() { cin >> a >> b >> c; p = (a + b + c) / 2; m = p * (p - a) * (p - b) * (p - c); cout << fixed << setprecision(2) << sqrt(m); return 0; }

            • 0
              @ 2024-8-1 10:58:32
              using namespace std;
              double f(double a,double b,double c)
              {
              	double p=(a+b+c)/2.0;
              	p=sqrt(p*(p-a)*(p-b)*(p-c));
              	return p;
              }
              int main()
              {
              	double a,b,c;
              	cin>>a>>b>>c;
              	cout<<fixed<<setprecision(2)<<f(a,b,c)<<endl;
                  return 0;
              }
              
              • 0
                #include<bits/stdc++.h>
                using namespace std;
                
                double f(double a,double b,double c)
                {
                	double p=0;
                	p=(a+b+c)/2;
                	p=sqrt(p*(p-a)*(p-b)*(p-c));
                	return p;
                }
                int main()
                {
                	double a,b,c;
                	cin>>a>>b>>c;
                	cout<<fixed<<setprecision(2)<<f(a,b,c);
                	return 0;
                } 
                
                • 0

                  #include<bits/stdc++.h> using namespace std;

                  double f(double a,double b,double c) { double p=0; p=(a+b+c)/2; p=sqrt(p*(p-a)(p-b)(p-c)); return p; } int main() { double a,b,c; cin>>a>>b>>c; cout<<fixed<<setprecision(2)<<f(a,b,c); return 0; }

                  • 0

                    函数

                    #include<bits/stdc++.h>
                    using namespace std;
                    double p,k;
                    double san(double a,double b,double c){
                    	p=(a+b+c)/2.0;
                    	k=sqrt(p*(p-a)*(p-b)*(p-c));
                    	return k;
                    }
                    int main(){
                    	double a,b,c;
                    	cin>>a>>b>>c;
                    	cout<<fixed<<setprecision(2)<<san(a,b,c);
                    	return 0; 
                    }
                    
                    • 0
                      @ 2024-8-1 10:45:27

                      函数:

                      #include<iostream>
                      #include<iomanip>
                      #include<cmath>
                      using namespace std;
                      double f(double a, double b, double c)
                      {
                      	double p = (a + b + c) / 2;
                      	return sqrt(p * (p - a) * (p - b) * (p - c));
                      }
                      int main()
                      {
                      	double a, b, c;
                      	cin >> a >> b >> c;
                      	cout << fixed << setprecision(2) << f(a, b, c);
                      	return 0;
                      }
                      
                      • 0
                        @ 2024-6-4 21:27:58

                        #include<iostream>

                        #include<cmath>

                        #include<iomanip>

                        using namespace std;

                        int main()

                        {

                        double a,b,c,d,p;

                        cin>>a>>b>>c;

                        p=(a+b+c)/2;

                        d=p*(p-a)(p-b)(p-c);

                        cout << setiosflags (ios::fixed<<setprecision(2);

                        cout <<sqrt(d);

                        return 0;

                        }

                        • 0
                          @ 2024-2-3 17:06:27
                          #include<iostream>
                          #include<cstdio>
                          #include<string>
                          #include<bits/stdc++.h>
                          #define LL long long
                          using namespace std;
                          const int INF=0x3f3f3f3f;
                          const int N=2e5+10;
                          double a,b,c;
                          int main(){
                          	cin>>a>>b>>c;
                          	double p=(a+b+c)/2;
                          	printf("%.2f",sqrt(p*(p-a)*(p-b)*(p-c)));
                          }
                          
                          
                          
                          
                          
                          • 0
                            @ 2023-3-12 19:46:36

                            #include <iostream> #include <stdio.h> #include <string.h> #include <queue> #include <math.h> #include <vector> #include <algorithm> #include <iomanip> #include <stack> #include <bits/stdc++.h> using namespace std; int main(){ double a,b,c,p,m; cin>>a>>b>>c; p=(a+b+c)/2; double sum; m= p * (p - a) * (p - b) * (p - c); cout << fixed << setprecision(2) << sqrt(m);

                            return 0;
                            

                            }

                            • -4
                              @ 2022-2-8 17:31:35

                              #include <stdio.h> #include <iostream> #include <math.h> using namespace std; int main() { double a , b , c , p; cin >> a >> b >> c; p = (a + b + c)/2; double num = p*(p - a)(p - b)(p - c); double s = sqrt ( num ); printf("%.2lf",s);

                              }

                              • -4
                                @ 2022-1-17 22:21:56
                                #include <iostream>
                                #include <stdio.h>
                                #include <string.h>
                                #include <queue>
                                #include <math.h>
                                #include <vector>
                                #include <algorithm>
                                #include <iomanip>
                                #include <stack>
                                
                                using namespace std;
                                
                                #define LL long long
                                const int N =1e5+10;
                                const int INF =0x3f3f3f3f;
                                
                                int main(){
                                    double a,b,c,p;
                                    cin>>a>>b>>c;
                                    p=(a+b+c)/2;
                                    cout<<fixed<<setprecision(2)<<sqrt(p*(p-a)*(p-b)*(p-c))<<endl;
                                    return 0;
                                }
                                
                                • 1

                                信息

                                ID
                                822
                                时间
                                1000ms
                                内存
                                128MiB
                                难度
                                5
                                标签
                                递交数
                                1001
                                已通过
                                350
                                上传者