Unique Digit Integer

Unique Digit Integer


A unique-digit integer is a positive integer (without leading zeros) with no duplicate digits. For example 7, 135, 214 are all unique-digit integers whereas 33, 3121, 300 are not.

Given two positive integers m and n, where m

The input contains two positive integers m and n. Assume m<30000 and n<30000. You are to output the number of unique-digit integers in the specified range along with their values in the format specified below:

SAMPLE DATA:

INPUT: m = 100 n = 120 
OUTPUT: THE UNIQUE- DIGIT INTEGERS ARE : 102, 103, 104, 105, 106, 107, 108, 109, 120.
FREQUENCY OF UNIQUE-DIGIT INTEGERS IS: 9.

Have something to say? Log in to comment on this post.

0 comments