13 条题解

  • 6
    @ 2023-10-14 16:00:22

    注意区别单精度与双精度,题目的测试用例范围会很广

    #include<iostream>
    #include<cmath>
    #include <stdexcept>
    using namespace std;
    int main(){
        double s,p,a,b,c,d;
        cin>>a>>b>>c;
        p = 0.5*(a+b+c);
        s = p*(p-a)*(p-b)*(p-c);
        d = sqrt(s);
        printf("%.1f",d);
        return 0;
    }
    
    • 4
      @ 2024-2-22 9:19:08
      #include<iostream>
      #include<cmath>
      #include <stdexcept>
      using namespace std;
      int main(){
          double s,p,a,b,c,d;
          cin>>a>>b>>c;
          p = 0.5*(a+b+c);
          s = p*(p-a)*(p-b)*(p-c);
          d = sqrt(s);
          printf("%.1f",d);
          return 0;
      }
      
      • 1
        @ 2024-2-22 9:23:13
        #include<iostream>
        #include<cmath>
        #include <stdexcept>
        using namespace std;
        int main(){
            double s,p,a,b,c,d;
            cin>>a>>b>>c;
            p = 0.5*(a+b+c);
            s = p*(p-a)*(p-b)*(p-c);
            d = sqrt(s);
            printf("%.1f",d);
            return 0;
        }
        
        • 0
          @ 2025-2-13 10:59:57

          klxz'v jSSSSSSSjzb ohgoxcvoDSVvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

          • -1
            @ 2024-7-16 10:41:02

            #include<bits/stdc++.h> using namespace std; int main(){ double a; cin>>a; if(a<=150)printf("%.1lf",0.4463a); if(a<=400 and a>150)printf("%.1lf",0.4663(a-150)+0.4463150); if(a>400)printf("%.1lf",0.5663(a-400)+0.4463150+0.4663250); return 0; }

            • -2
              @ 2024-2-22 11:19:51

              #include #include #include using namespace std; int main(){ double s,p,a,b,c,d; cin>>a>>b>>c; p = 0.5*(a+b+c); s = p*(p-a)(p-b)(p-c); d = sqrt(s); printf("%.1f",d); return 0; } 👀️ 👀️

              • -2
                @ 2024-2-22 10:28:23
                #include<iostream>
                #include<cmath>
                #include <stdexcept>
                using namespace std;
                int main(){
                    double s,p,a,b,c,d;
                    cin>>a>>b>>c;
                    p = 0.5*(a+b+c);
                    s = p*(p-a)*(p-b)*(p-c);
                    d = sqrt(s);
                    printf("%.1f",d);
                    return 0;
                }
                
                • -2
                  @ 2024-2-22 10:02:44
                  #include<iostream>
                  #include<cmath>
                  #include <stdexcept>
                  using namespace std;
                  int main(){
                      double s,p,a,b,c,d;
                      cin>>a>>b>>c;
                      p = 0.5*(a+b+c);
                      s = p*(p-a)*(p-b)*(p-c);
                      d = sqrt(s);
                      printf("%.1f",d);
                      return 0;
                  }
                  
                  • -2
                    @ 2024-2-22 9:30:58
                    #include<iostream>
                    #include<cmath>
                    #include <stdexcept>
                    using namespace std;
                    int main(){
                        double s,p,a,b,c,d;
                        cin>>a>>b>>c;
                        p = 0.5*(a+b+c);
                        s = p*(p-a)*(p-b)*(p-c);
                        d = sqrt(s);
                        printf("%.1f",d);
                        return 0;
                    }
                    
                    • -2
                      @ 2024-2-22 9:28:10
                      #include<iostream>
                      #include<cmath>
                      #include <stdexcept>
                      using namespace std;
                      int main(){
                          double s,p,a,b,c,d;
                          cin>>a>>b>>c;
                          p = 0.5*(a+b+c);
                          s = p*(p-a)*(p-b)*(p-c);
                          d = sqrt(s);
                          printf("%.1f",d);
                          return 0;
                      }
                      
                      • -2
                        @ 2024-2-22 9:10:18

                        #include<bits/stdc++.h> #include #include using namespace std; int main(){ double s,p,a,b,c,d; cin>>a>>b>>c; p = 0.5*(a+b+c); s = p*(p-a)(p-b)(p-c); d = sqrt(s); printf("%.1f",d); return 0; }

                        • -6
                          @ 2023-12-15 17:03:00

                          #include #include #include using namespace std; int main(){ double s,p,a,b,c,d; cin>>a>>b>>c; p = 0.5*(a+b+c); s = p*(p-a)(p-b)(p-c); d = sqrt(s); printf("%.1f",d); return 0; }

                          • 1

                          信息

                          ID
                          610
                          时间
                          1000ms
                          内存
                          512MiB
                          难度
                          4
                          标签
                          (无)
                          递交数
                          581
                          已通过
                          286
                          上传者