You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
473 B
16 lines
473 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int a,b,c,d,e;
|
|
scanf("%d%d%d%d%d",&a,&b,&c,&d,&e);
|
|
a=a/3;b=b+a;e=e+a; //1号小朋友分糖
|
|
b=b/3;c=c+b;a=a+b; //2号小朋友分糖
|
|
c=c/3;d=d+c;b=b+c; //3号小朋友分糖
|
|
d=d/3;e=e+d;c=c+d; //4号小朋友分糖
|
|
e=e/3;a=a+e;d=d+e; //5号小朋友分糖
|
|
printf("%d %d %d %d %d\n",a,b,c,d,e); //输出分糖果后每个小朋友的糖果数量
|
|
return 0;
|
|
}
|