8 条题解

  • 0
    @ 2025-9-17 21:40:28
    #include<iostream>
    using namespace std;
    int main(){
        int a,b,c,d,e,f;
        cin>>a>>b>>c>>d>>e;
        f=a%3;
    	a/=3;
        b+=a;
        e+=a;
        f=f+b%3;
    	b/=3;
        c+=b;
        a+=b;
        f=f+c%3;
    	c/=3;
        d+=c;
        b+=c;
        f=f+d%3;
    	d/=3;
        e+=d;
        c+=d;
        f=f+e%3;
    	e/=3;
        d+=e;
        a+=e;
        cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<e<<endl;
        cout<<f;
    }
    
    

    信息

    ID
    4470
    时间
    1000ms
    内存
    128MiB
    难度
    1
    标签
    (无)
    递交数
    340
    已通过
    152
    上传者