Need Help!!!

Revision en1, by gender, 2024-01-20 19:57:20

A number for which any two consecutive digits differ in absolute value by at most one is called a stepping number.

Find the kth stepping number greater that an integer N

The first line contains a long number N denoting the number from which we have to start finding our stepping number.

Constraints

N-> 10^18 K-> 10^18

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English gender 2024-01-20 19:57:20 344 Initial revision (published)