clc
tot=0;
for i=0:5
n=num2str(i);
for j=i+1:i+4
n=[n num2str(j)];
end
p=perms(n);
for j=1:size(p)
n=str2num(p(j,:));
if mod(n,55)==0
tot=tot+1;
disp(n)
end
end
disp(" ")
end
disp(tot)
reports there are 20 such numbers and groups them by the set of digits used:
43120
42130
34210
31240
24310
21340
13420
12430
36245
34265
26345
24365
74635
73645
64735
63745
68475
67485
48675
47685
There are 8 in the group where the lowest digit is zero and four each where the lowest digit is 2, 3 and 4.
|
Posted by Charlie
on 2021-02-27 15:55:35 |