Company: Mthree _6march
Difficulty: medium
Unsafe password Problem Description Assume that a system generates passwords consisting of integers only. A password is considered unsafe if the starting number is the same as the ending number of the password. Given two integer values L and R, what is the total count of unsafe passwords that can be generated in the range between L and R (including L and R)? Function Description Complete the solve() function. This function takes the following 2 parameters and returns the required output: L: Represents the starting number in the range R: Represents the ending number in the range Input format for custom testing Note: Use this input format if you are testing against custom input or writing code in a language where we don't provide boilerplate code The first line contains 2 integers L and R that represent the starting and ending numbers in the range respectively. Output format Print the number of unsafe passwords in the range [L, R] (including L and R). Examples Example 1: Input: 47 74 Out