Sum of numbers in an interval

Write a funcion @sum_interval(a, b, n)@ that receives two integers a,ba,b such that 0ab0\le{a}\le{b}, and a natural 0n90\le{n}\le{9}, and returns the sum of all integers in [a,b][a,b] whose last digit is nn.

Sample session

Problem information

Author: ProAl

Generation: 2026-01-25T15:54:06.888Z

© Jutge.org, 2006–2026.
https://jutge.org