2069:【例2.12 】糖果游戏

aobatian 2021-10-24 15:32:36 1

#include

using namespace std;

int main()

{

int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;

cin>>a>>b>>c>>d>>e;

f=a/3;

g=(b+f)/3;

h=(c+g)/3;

i=(d+h)/3;

j=(e+f+i)/3;

k=f+g+j;

l=g+h;

m=h+i;

n=i+j;

o=j+0;


printf("%5d%5d%5d%5d%5d",k,l,m,n,o);

return 0;

}

{{ vote && vote.total.up }}