1 条题解

  • 0
    @ 2024-8-2 16:19:43

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int n;
    int main()
    {
     cin>>n;
     
     for(int i = 0;i <= n / 2;i++){
     int t = n - i * 2;
     if(t % 3 == 0){
     cout<<i<<" "<<t / 3<<endl;
     }
     }
     return 0;
    }
    
    • 1

    信息

    ID
    974
    时间
    1000ms
    内存
    128MiB
    难度
    10
    标签
    递交数
    4
    已通过
    3
    上传者