All submissions for this problem are available.
Satishwar needs to impress his girlfriend by generating funky numbers. A funky number is a positive integer in which the absolute difference between each of the adjacent digits is at least 2. For example,
NOT FUNKY: 283459, 1459, 333333, 97753, 1234
FUNKY: 2904264, 1317317313, 975839753, 5
You are given two integers low and high and you have to help Satishwar tell the number of all funky numbers between low and high (inclusive).
|Time Limit:||2 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, JAVA, GO, PYP3|
Fetching successful submissions
If you are still having problems, see a sample solution here.