Find all possible digits x, y, z such that the number 13xy45z is divisible
by 792.
basis=1300450;
for x=0:9
b1=basis+10000*x;
for y=0:9
b2=b1+1000*y;
for z=0:9
n=b2+z;
if mod(n,792)==0
fprintf('%2d %2d %2d %8d %7d \n',x,y,z,n,n/792)
end
end
end
end
finds only
x y z n n/792
8 0 6 1380456 1743
|
Posted by Charlie
on 2020-10-20 09:33:54 |