4 条题解

  • 0
    @ 2024-12-29 10:48:02
    #include<bits/stdc++.h>
    #define int double
    using namespace std;
    signed main(){
    	int n,m;
    	cin>>n>>m;
    	cout<<fixed<<setprecision(1)<<n*m/2.0;
    }
    
    • 0
      @ 2024-12-29 8:36:23

      printf。但是必须要除以 2.02.0 而不是 22

      #include<bits/stdc++.h>
      #define int long long
      #define INF 0x3f3f3f
      using namespace std;
      int x,y;
      signed main(){
      	cin>>x>>y;
      	printf("%.1lf",x*y/2.0);
      	return 0;
      }
      
      • 0
        @ 2024-12-28 22:57:37

        三角形面积公式(SS 代表三角形的面积,ss 代表底,hh 代表高):

        S=sh2S=\frac{sh}{2}

        于是这道题直接秒了啊!!!

        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
        	int s,h;
        	cin>>s>>h;
        	double qwq=s*1.0*h/2;
        	printf("%.1f",qwq);
        	return 0;
        }
        
        • @ 2024-12-28 22:58:24

          唉唉我个 joker 忘了分数线怎么弄的导致直接开了洛谷帮助中心看了眼 LaTeX 怎么用的

      • 0
        @ 2024-12-22 11:03:54

        C++ :

        #include<iostream>
        using namespace std;
        int main(){
            double a;
            double b;
            cin>>a>>b;
            cout<<a*b/2;
            return 0;
        }
        

        Python :

        # coding=utf-8
        a=float(input())
        h=float(input())
        s=a*h/2
        print(s)
        
        • 1

        信息

        ID
        40
        时间
        1000ms
        内存
        128MiB
        难度
        3
        标签
        (无)
        递交数
        25
        已通过
        18
        上传者