Ask a Question


Start Coding Today




Data Structures


Interview Experiences

C Programming

C++ Programming

Java Programming



Find the number of subsequences of a n-digit number, stored as a string, that are divisible by 8.

n = 1 to 10^5.

eg. if n=3 and number = 968, then there are 3 subsequences of it, 968, 96 and 8, that are divisible by 8. So, the answer is 3.

Since the answer can be very large, print the answer modulo (10^9 + 7).

asked Jan 11 by Nitik Gupta

1 Answer

0 votes

It is a Question from a running contest. Wait for the contest to End.

answered Jan 13 by mohdanishh
reshown Mar 30 by Shubham Baranwal 1

Please log in or register to answer this question.