2 条题解

  • 2
    @ 2023-10-14 18:53:53

    **楼下太麻烦了 看我的😄 ** 已AC

    #include<bits/stdc++.h>
    using namespace std;
    int n;
    int main()
    {
        cin>>n;
        if(n%4==0)
        {
            cout<<(n/4)*(n/4);
        }
        else
        {
            cout<<(n/4)*((n/4)+1);
        }
        return 0;
    }
    

    先赞后搬

    • 0
      @ 2023-1-17 15:05:50
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	int n, s = 0; //周长
      	cin >> n;
      	//遍历一条边可能的范围
      	for(int i = 1; i <= n/2-1; i++){
      		//记录最大的面积
      		if(i*(n/2-i) > s){
      			s = i*(n/2-i);
      		} 
      	} 
      	cout << s << endl;
      	return 0;
      }
      
      
      • 1

      【入门】小兔子的最大活动面积

      信息

      ID
      353
      时间
      1000ms
      内存
      16MiB
      难度
      2
      标签
      递交数
      52
      已通过
      34
      上传者