https://leetcode.com/problems/excel-sheet-column-number/

class Solution {
public:
int titleToNumber(string s) {
int ans = 0;
for(int i = 0;i < s.length();i++)
{
ans *= 26;
ans += s[i] - 'A' + 1;
}
return ans;
}
};

  

Leetcode 171 Excel Sheet Column Number 难度:0的更多相关文章

  1. [LeetCode] 171. Excel Sheet Column Number 求Excel表列序号

    Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, retur ...

  2. LeetCode 171. Excel Sheet Column Number (Excel 表格列数字)

    Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, retur ...

  3. ✡ leetcode 171. Excel Sheet Column Number 字母转换为数字 --------- java

    Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, retur ...

  4. Java for LeetCode 171 Excel Sheet Column Number

    Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, retur ...

  5. LeetCode: 171 Excel Sheet Column Number(easy)

    题目: Related to question Excel Sheet Column Title Given a column title as appear in an Excel sheet, r ...

  6. Leetcode 171 Excel Sheet Column Number python

    题目: Given a column title as appear in an Excel sheet, return its corresponding column number. For ex ...

  7. LeetCode 171 Excel Sheet Column Number 解题报告

    题目要求 Given a column title as appear in an Excel sheet, return its corresponding column number. For e ...

  8. LeetCode 171 Excel Sheet Column Number

    Problem: Given a column title as appear in an Excel sheet, return its corresponding column number. F ...

  9. 20. leetcode 171. Excel Sheet Column Number

    Given a column title as appear in an Excel sheet, return its corresponding column number. For exampl ...

随机推荐

  1. ECMAScript 6教程 (一)

    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出 原文连接,博客地址为 http://www.cnblogs.com/jasonnode/ .该系列课程是 ...

  2. 【数论】二进制GCD

    二进制GCD     GCD这种通用的算法相信每个OLER都会 ,辗转相除,代码只有四行 : int GCD(int a,int b){ if(b==0) return a; return GCD(b ...

  3. innodb数据结构

    Jeremy Cole on InnoDB architecture : Efficiently traversing InnoDB B+Trees with the page directory   ...

  4. Android中AIDL通信机制分析

    一.背景 ·1.AIDL出现的原因 在android系统中,每一个程序都是运行在自己的进程中,进程之间无法进行通讯,为了在Android平台,一个进程通常不能访问另一个进程的内存空间,所以要想对话,需 ...

  5. MySQL functions, IF, CASE

    MySQLTutorial官网 IF function syntax: IF(expr,if_true_expr,if_false_expr) CASE expression syntax: CASE ...

  6. java 级联删除文件夹下的所有文件

    public void deletefile(String delpath) throws Exception { try { File file = new File(delpath); // 当且 ...

  7. log4j.properties的配置

    #初始化类中要使用的Logger对象实例:log4j.rootLogger = [ level ] , appenderName1, appenderName2, … #第一个参数是日志级别(DEBU ...

  8. C++11 图说VS2013下的引用叠加规则和模板参数类型推导规则

    背景:    最近在学习C++STL,出于偶然,在C++Reference上看到了vector下的emplace_back函数,不想由此引发了一系列的“探索”,于是就有了现在这篇博文. 前言:     ...

  9. 系统收到了多个不同的 Content-Disposition 标头。为了避免遭到 HTTP 响应拆分攻击,这种情况是不允许的。

    今天使用Struts2进行上传下载的时候发现了一个现象 我的Struts2配置文件 <action name="share_ExportExcel" class=" ...

  10. 《BI那点儿事》ETL中的关键技术

    ETL(Extract/Transformation/Load)是BI/DW的核心和灵魂,按照统一的规则集成并提高数据的价值,是负责完成数据从数据源向目标数据仓库转化的过程,是实施数据仓库的重要步骤. ...