Hello everyone! I would be very greatfull if someone could help me. I was given C++ task. Could anyone give me some ideas of writing the code. The problem goes here…
I was given some set of tickets. First ticket is numbered M, last – N.
M and N have the following limitations: 10000000 ? M < N ? 99999999.
Your task is to identify total number of “lucky” tickets in the given range.
We say that ticket is “lucky”, if the sum of first 4 digits equals to the sum of last 4 digits.
Input:
Input contains first and the last possible number of the tickets.
Output
Output total number of “lucky” tickets in given range.