Liczby podzielne przez 5 kończą się cyfrą 0 lub 5.
Gdy liczba zaczyna się cyfrą 5, musi się kończyć cyfrą 0, a więc środkową cyfrą może być 1 z 3 pozostałych, stąd 3 możliwości.
Gdy cyfra zaczyna się inną cyfrą niż 5, to możliwości jest [tex]3\cdot 2\cdot 3=18[/tex] - pierwsza cyfra dowolna z 3 (1,3,7), ostatnia cyfra 1 z 2 (0,5), a cyfra środkowa dowolna z pozostałych 3.
Liczby podzielne przez 5 kończą się cyfrą 0 lub 5.
Gdy liczba zaczyna się cyfrą 5, musi się kończyć cyfrą 0, a więc środkową cyfrą może być 1 z 3 pozostałych, stąd 3 możliwości.
Gdy cyfra zaczyna się inną cyfrą niż 5, to możliwości jest [tex]3\cdot 2\cdot 3=18[/tex] - pierwsza cyfra dowolna z 3 (1,3,7), ostatnia cyfra 1 z 2 (0,5), a cyfra środkowa dowolna z pozostałych 3.
[tex]3+18=21[/tex]
Zatem jest 21 takich liczb.