include "alldifferent.mzn"; var 1..9:S; var 0..9:E; var 0..9:N; var 0..9:D; var 1..9:M; var 0..9:O; var 0..9:R; var 0..9:Y; constraint alldifferent([S,E,N,D,M,O,R,Y]); constraint (M + S)*1000 + (O + E)*100 + (N+R)*10 + D + E == M*10000 + O*1000 + N*100 + E*10 + Y; output["Result of SEND MORE MONEY: \n", " ",show(S), show(E), show(N), show(D),"\n", " ", show(M), show(O), show(R), show(E), "\n", show(M), show(O), show(N), show(E), show(Y)]; solve satisfy;