You are given a DNA string dna consisting only of characters A, C, G, T.
For any substring dna[l..r], define its palindrome modification cost as the minimum number of single-character substitutions required to make that substring a palindrome. (Equivalently, it is the number of mismatched character pairs when comparing from both ends: count of indices i where dna[l+i] != dna[r-i] for i < (r-l+1)/2.)
Compute the sum of palindrome modification costs over all substrings of dna, and output the result as a 64-bit integer.
dna
.
long
/
int64
).