Company: Mthree _6march
Difficulty: medium
Unsafe password Problem Description Suppose a login system only ever generates passwords made of digits. Such a password counts as unsafe whenever its first digit matches its last digit. Given two integers L and R, how many unsafe passwords fall within the inclusive range from L to 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 Output: 2 Explanation: Scanning every value from 47 to 74, only 55 and 66 begi