How to achieve digital equality and invariance with Java

for example, int a = 50; int b = 12;
[12 br 12]
how to disassemble this effect

Jul.07,2022

int num = a/b;
int lastNum = a%b;
List<Integer> list = new ArrayList();
for (int i =0;i<num;iPP){
    list.add(b);
}
if(lastNum != 0){
    list.add(lastNum);
}

how about this? there should be that kind of split result in list

Menu