当前位置:网站首页>20220602 Mathematics: Excel table column serial number
20220602 Mathematics: Excel table column serial number
2022-07-03 10:11:00 【Seeyouagain】
Title Description : Give you a string columnTitle
, Express Excel Column names in the table . return The column sequence number corresponding to the column name .
coded :
public int titleToNumber(String columnTitle) {
Long result=0L;
if (null == columnTitle){
return result.intValue();
}
char[] chars = columnTitle.toCharArray();
for(int i=0;i<chars.length;i++)
{
result = (result+chars[i]-'A'+1) * 26;
}
result = result / 26;
return result.intValue();
}
边栏推荐
- Dictionary tree prefix tree trie
- Basic knowledge of communication interface
- 51 MCU tmod and timer configuration
- [combinatorics] combinatorial existence theorem (three combinatorial existence theorems | finite poset decomposition theorem | Ramsey theorem | existence theorem of different representative systems |
- LeetCode - 706 设计哈希映射(设计) *
- CV learning notes convolutional neural network
- The data read by pandas is saved to the MySQL database
- Development of intelligent charging pile (I): overview of the overall design of the system
- . DLL and Differences between lib files
- 20220607其他:两整数之和
猜你喜欢
Retinaface: single stage dense face localization in the wild
LeetCode - 705 设计哈希集合(设计)
Development of intelligent charging pile (I): overview of the overall design of the system
My notes on intelligent charging pile development (II): overview of system hardware circuit design
My notes on the development of intelligent charging pile (III): overview of the overall design of the system software
2312、卖木头块 | 面试官与狂徒张三的那些事(leetcode,附思维导图 + 全部解法)
CV learning notes alexnet
CV learning notes - Stereo Vision (point cloud model, spin image, 3D reconstruction)
Leetcode-106:根据中后序遍历序列构造二叉树
openCV+dlib實現給蒙娜麗莎換臉
随机推荐
Swing transformer details-2
Serial communication based on 51 single chip microcomputer
(1) What is a lambda expression
Dictionary tree prefix tree trie
Modelcheckpoint auto save model
Positive and negative sample division and architecture understanding in image classification and target detection
4G module at command communication package interface designed by charging pile
Vgg16 migration learning source code
Pycharm cannot import custom package
Leetcode-513:找树的左下角值
LeetCode - 919. 完全二叉树插入器 (数组)
【C 题集】of Ⅵ
Opencv Harris corner detection
[combinatorics] combinatorial existence theorem (three combinatorial existence theorems | finite poset decomposition theorem | Ramsey theorem | existence theorem of different representative systems |
51 MCU tmod and timer configuration
CV learning notes alexnet
20220608其他:逆波兰表达式求值
CV learning notes - reasoning and training
My 4G smart charging pile gateway design and development related articles
使用sed替换文件夹下文件