标签:char strong width size image info == col idt
题目:
解答:
1 class Solution { 2 public: 3 string freqAlphabets(string s) 4 { 5 string ans; 6 for (int i = 0; i < s.size(); ++i) 7 { 8 if (i + 2 < s.size() && s[i + 2] == ‘#‘) 9 { 10 ans += char((s[i] - ‘0‘) * 10 + (s[i + 1] - ‘1‘) + ‘a‘); 11 i += 2; 12 } 13 else 14 { 15 ans += char(s[i] - ‘1‘ + ‘a‘); 16 } 17 } 18 return ans; 19 } 20 };
标签:char strong width size image info == col idt
原文地址:https://www.cnblogs.com/ocpc/p/12824574.html