0

how to solve this task through python?

Find the number of five-digit numbers whose last three digits form an increasing arithmetic progression. Numbers cannot start from zero.

18th Oct 2022, 7:13 AM
TemkaGame
TemkaGame - avatar
1 Answer
+ 1
You can either: Get the digits by using the division and reminder, for example: 45321%10 = 1, 54321/10 = 5432, 5432%10 = 2, ... Get the digits by transforming the number to string, then you can use the function ord to see the ASCII position, if it's higher then the ASCII position will be also higher.
18th Oct 2022, 11:00 AM
TomĂĄs Ribeiro
TomĂĄs Ribeiro - avatar