6 条题解

  • 1
    @ 2024-12-22 18:34:16

    只要你会计算表面积这题不还是秒了!!(但是,别把地板给算进去了,你家地板刷涂料的?!)

    还有,根据题目,每平方米都要 1111 元,千万别搞成每平方米 66 元然后加 55 元人工费了。。。

    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	float a,b,h;
    	cin>>a>>b>>h;
    	float qwq;
    	cin>>qwq;
    	cout<<int(round((a*b+a*h*2+b*h*2-qwq)*11));//注意,要四舍五入!!!(这个破地方坑了我一发。。。)
    	return 0;
    }
    
    • 0
      @ 2024-12-27 21:06:22
      #include<bits/stdc++.h>
      using namespace std;
      signed main(){
      	double a,b,c,d;
      	cin>>a>>b>>c>>d;
      	cout<<round((a*b+a*c*2+b*c*2-d)*11);
      }
      
      
      • 0
        @ 2024-12-22 20:40:06

        python:

        a=float(input())
        b=float(input())
        c=float(input())
        d=float(input())
        cnt=a*b+b*c*2+a*c*2-d
        cnt*=11
        print(round(cnt))
        

        轻轻松松简简单单 注意浮点型!!

        • 0
          @ 2024-12-22 11:28:07

          和另一题基本没区别:

          #include<bits/stdc++.h>
          using namespace std;
          double a,b,c,d;
          int main(){
          	cin>>a>>b>>c>>d;
          	printf("%.0f",(a*c*2+b*c*2+a*b-d)*11);
          }
          
          • 0
            @ 2024-12-22 11:16:07

            直接计算输出即可。但是要注意地板不用刷。

            #include<bits/stdc++.h>
            #define int long long
            #define INF 0x3f3f3f
            using namespace std;
            double a,b,c,d;
            signed main(){
            	cin>>a>>b>>c>>d;
            	double x=a*b+a*c*2.0+b*c*2.0-d;
            	printf("%.0lf",x*11.0);
            	return 0;
            }
            
            • 0
              @ 2024-12-22 11:03:52

              C++ :

              #include<bits/stdc++.h>
              using namespace std;
              int main(){
              	long double x,y,z,sb;
              	cin>>x>>y>>z>>sb;
              	cout<<round(11*(x*y+2*x*z+2*y*z-sb));
              	return 0;
              }
              

              Python :

              # coding=utf-8
              a=float(input())
              b=float(input())
              c=float(input())
              k=float(input())
              cost=(a*b+a*c*2+b*c*2-k)*11;
              print(format(cost,'.2f'))
              
              • 1

              信息

              ID
              5
              时间
              3000ms
              内存
              128MiB
              难度
              1
              标签
              递交数
              56
              已通过
              38
              上传者