问题
代码
#include <iostream>
using namespace std;
int main() {
int a,b,c,d,e;//分别表示5个小朋友的糖果数量
cin>>a>>b>>c>>d>>e;
a/=3;//也可以写成<a=a/3;>
e+=a;//<e=e+a;>
b+=a;//<b=b+a;>
b/=3;//同上
a+=b;
c+=b;
c/=3;
b+=c;
d+=c;
d/=3;
c+=d;
e+=d;
e/=3;
d+=e;
a+=e;
cout<<a<<" ";
cout<<b<<" ";
cout<<c<<" ";
cout<<d<<" ";
cout<<e<<" ";
return 0;
}