标签:gif first das mit iostream pair font sample open
You are given a string s=s1s2…sns=s1s2…sn of length nn, which only contains digits 11, 22, ..., 99.
A substring s[l…r]s[l…r] of ss is a string slsl+1sl+2…srslsl+1sl+2…sr. A substring s[l…r]s[l…r] of ss is called even if the number represented by it is even.
Find the number of even substrings of ss. Note, that even if some substrings are equal as strings, but have different ll and rr, they are counted as different substrings.
The first line contains an integer nn (1≤n≤650001≤n≤65000) — the length of the string ss.
The second line contains a string ss of length nn. The string ss consists only of digits 11, 22, ..., 99.
Print the number of even substrings of ss.
4 1234
6
4 2244
10
标签:gif first das mit iostream pair font sample open
原文地址:https://www.cnblogs.com/buhuiflydepig/p/10632609.html