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.
1 ответ
+ 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.