Given a large number as string (size upto 10^5). Find count of subsequences which are divisible by 4 ( asked in salesforce ). Find count of subsequences which are divisible by N.
We call a positive integer number fair if it is divisible by each of its nonzero digits. For example, 102 is fair (because it is divisible by 1 and 2 ), but 282 is not, because it isn't divisible by 8 . Given a positive integer 𝑛 . Find the minimum integer 𝑥 , such that 𝑛≤𝑥 and 𝑥 is fair.