leetcode171
生活随笔
收集整理的這篇文章主要介紹了
leetcode171
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1 class Solution {
2 public:
3 int titleToNumber(string s) {
4 int tot=0,i;
5 for(i=0;i<s.size();i++)
6 tot=tot*26+s[i]-'A'+1;
7 return tot;
8 }
9 };
?
轉載于:https://www.cnblogs.com/thefirstfeeling/p/5692573.html
總結
以上是生活随笔為你收集整理的leetcode171的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C++连接mysql的两种方式(ADO连
- 下一篇: 正则表达式 非捕获性分组