1599 - Multiple
Time Limit : 2 Second
Memory Limit : 64 MB
- Rocket323 loves math very much. One day, Rocket323 got a number string. He could choose some consecutive digits from the string to form a number. Rocket323 loves 64 very much, so he wanted to know how many ways can he choose from the string so the number he got multiples of 64 ?
A number cannot have leading zeros. For example, 0, 64, 6464, 128 are numbers which multiple of 64 , but 12, 064, 00, 1234 are not.
- Multiple cases, in each test cases there is only one line consist a number string.
Length of the string is less than 3 * 10^5 .
Huge Input , scanf is recommended.
- Print the number of ways Rocket323 can choose some consecutive digits to form a number which multiples of 64.
- sample input
- sample output
- There are five substrings which multiples of 64.
- Problem Setter : Yang Xiao