2 solutions

  • 2
    @ 2026-1-25 14:30:47

    #include <bits/stdc++.h>

    using namespace std;

    int main() {

    int a;
    
    cin>>a;
    
    int x,y,z;
    
    x=y=z=a/3;
    
    x/=2;
    
    y/=2;
    
    z=x+y+z;
    
    x/=2;
    
    z/=2;
    
    y=y+x+z;
    
    y/=2;
    
    z/=2;
    
    x=x+y+z;
    
    cout<<x<<" "<<y<<" "<<z;
    
    return 0;
    

    }

    Information

    ID
    537
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    6
    Tags
    # Submissions
    211
    Accepted
    63
    Uploaded By