7 条题解

  • 2
    @ 2025-3-3 13:18:24
    a,b,c=map(int,input().split())
    p=(a+b+c)/2
    if a+b<=c or a+c<=b or b+c<=a:
        print("Data Error!")
    else:
        print("%.2f" %((p*(p-a)*(p-b)*(p-c))**(1/2)))
    
  • 1
    @ 2025-3-18 15:36:16

    老鹰逼

    • 1
      @ 2025-3-11 14:42:45

      #include <bits/stdc++.h> using namespace std; double s; int main() { int a,b,c,p; cin>>a>>b>>c; p=(a+b+c)/2; s=sqrt(p*(p-a)(p-b)(p-c)); if(a+b<=c or a+c<=b or b+c<=a){ cout<<"Data Error"; }else{ printf("%.2f",s); }

      return 0;
      

      }

    • 0
      @ 2025-4-22 16:07:16

      一级棒

      • 0
        @ 2025-3-18 15:52:46

        #include <bits/stdc++.h>

        using namespace std; double a,b,c,S,p;

        int main() { cin>>a>>b>>c; if(a>0 and b>0 and c>0 and a+b>c and a+c>b and b+c>a){ p=0.5*(a+b+c); S=sqrt(p*(p-a)(p-b)(p-c)); printf("%.2f",S); }else{ cout<<"Data Error!"<<endl; }

        return 0;
        

        }

        • 0
          @ 2025-3-4 15:01:26
          #include <bits/stdc++.h>
          
          using namespace std;
          double a,b,c,s,p;
          int main() { 
          
          cin>>a>>b>>c;
          if(a+b<=c or a+c<=b or b+c<=a)
          {
              cout<<"Data Error!";
          }
          else{
          p=(a+b+c)/2;
          s=sqrt(p*(p-a)*(p-b)*(p-c));
          printf("%.2f",s);
          }
          return 0;
          }
          
          • 0
            @ 2025-2-24 22:47:18

            python

            a, b, c = map(float, input().split()) if a + b > c and a + c > b and b + c > a: p = (a + b + c) / 2 s = (p * (p - a) * (p - b) * (p - c)) ** 0.5 print("{:.2f}".format(s)) else: print("Data Error!")

            • 1

            信息

            ID
            41
            时间
            1000ms
            内存
            128MiB
            难度
            5
            标签
            递交数
            919
            已通过
            347
            上传者