4 条题解

  • 0
    @ 2024-12-3 22:53:24
    #include<bits/stdc++.h>
    using namespace std;
    int a,n,m;
    int main()
    {
    	cin>>a;
    	if(a%2!=0)
    	{
    		cout<<"0 0";
    		return 0;
    	}
    	n=a/4;
    	if(a!=n*4)
    	{
    		n+=(a-n*4)/2;
    	}
    	m=a/2;
    	cout<<n<<" "<<m;
    	return 0;
    }
    
    • 0
      @ 2024-12-2 20:42:57
      ```cpp
      #include<bits/stdc++.h>
      using namespace std;
      int main(){
          //还是要撸代码的,神。
          //(鸡有2只脚,兔子有4只脚,有残疾的)
          cout<<"残疾不会算";
      return 0;
      }
      
      
      • @ 2024-12-2 21:10:28

        6😂

      • @ 2024-12-2 21:12:51

        一个笼子里面关了鸡和兔子(鸡有2只脚,兔子有4只脚,

        没有残疾的

        )

    • 0
      @ 2024-11-16 22:08:01

      #include<bits/stdc++.h> using namespace std; int n; int main() { cin>>n; if(n%40) cout<<n/4<<' '<<n/2; else if(n%20) cout<<n/4+1<<' '<<n/2; else cout<<0<<' '<<0; return 0;//仅供参考 }

      • -1
        @ 2025-5-3 16:12:09
        using namespace std;
        int a,n,m;
        int main()
        {
        	cin>>a;
        	if(a%2!=0)
        	{
        		cout<<"0 0";
        		return 0;
        	}
        	n=a/4;
        	if(a!=n*4)
        	{
        		n+=(a-n*4)/2;
        	}
        	m=a/2;
        	cout<<n<<" "<<m;
        	return 0;
        }
        • 1

        信息

        ID
        8
        时间
        1000ms
        内存
        64MiB
        难度
        6
        标签
        递交数
        21
        已通过
        10
        上传者