3 deleted 25 characters in body
source | link

MATL, 2624 bytes

&:1000&\1e3&\,!'%03d'&V2&sw]-~s'%03d'&V2&sw]=s

Try it online!Try it online!

(-2 bytes thanks to Luis Mendo.)

&: - Make an inclusive range between the two given numbers

1000&\1e3&\ - 'divrem' - divide by 1000 and get the reminders and floored quotients in two arrays.

, - do twice

!'03d'&V - transpose and convert each value to a zero-padded three-width string

&s - sum each row's values

w - switch to bring the reminder array out and do this again on that

] - end loop

-= - differences between corresponding elements ofcheck for equality (returns 1s in places where the arrays

~ - logical negation, make 0 values 1 and nonzeros 0 are equal)

s - sum those to get the count (i.e. count the number of places the difference was 0implicit output)

MATL, 26 bytes

&:1000&\,!'%03d'&V2&sw]-~s

Try it online!

&: - Make an inclusive range between the two given numbers

1000&\ - 'divrem' - divide by 1000 and get the reminders and floored quotients in two arrays.

, - do twice

!'03d'&V - transpose and convert each value to a zero-padded three-width string

&s - sum each row's values

w - switch to bring the reminder array out and do this again on that

] - end loop

- - differences between corresponding elements of the arrays

~ - logical negation, make 0 values 1 and nonzeros 0

s - sum (i.e. count the number of places the difference was 0)

MATL, 24 bytes

&:1e3&\,!'%03d'&V2&sw]=s

Try it online!

(-2 bytes thanks to Luis Mendo.)

&: - Make an inclusive range between the two given numbers

1e3&\ - 'divrem' - divide by 1000 and get the reminders and floored quotients in two arrays.

, - do twice

!'03d'&V - transpose and convert each value to a zero-padded three-width string

&s - sum each row's values

w - switch to bring the reminder array out and do this again on that

] - end loop

= - check for equality (returns 1s in places where the arrays are equal)

s - sum those to get the count (implicit output)

2 added 593 characters in body
source | link

MATL, 2726 bytes

&:1000&\,!'%03d'&V2&sw]-g~s~s

Try it online!Try it online!

&: - Make an inclusive range between the two given numbers

1000&\ - 'divrem' - divide by 1000 and get the reminders and floored quotients in two arrays.

, - do twice

!'03d'&V - transpose and convert each value to a zero-padded three-width string

&s - sum each row's values

w - switch to bring the reminder array out and do this again on that

] - end loop

- - differences between corresponding elements of the arrays

~ - logical negation, make 0 values 1 and nonzeros 0

s - sum (i.e. count the number of places the difference was 0)

MATL, 27 bytes

&:1000&\,!'%03d'&V2&sw]-g~s

Try it online!

MATL, 26 bytes

&:1000&\,!'%03d'&V2&sw]-~s

Try it online!

&: - Make an inclusive range between the two given numbers

1000&\ - 'divrem' - divide by 1000 and get the reminders and floored quotients in two arrays.

, - do twice

!'03d'&V - transpose and convert each value to a zero-padded three-width string

&s - sum each row's values

w - switch to bring the reminder array out and do this again on that

] - end loop

- - differences between corresponding elements of the arrays

~ - logical negation, make 0 values 1 and nonzeros 0

s - sum (i.e. count the number of places the difference was 0)

1
source | link

MATL, 27 bytes

&:1000&\,!'%03d'&V2&sw]-g~s

Try it online!