当前位置:网站首页>20220602数学:Excel表列序号
20220602数学:Excel表列序号
2022-07-03 09:20:00 【丿SeeYouAgain】
题目描述:给你一个字符串 columnTitle ,表示 Excel 表格中的列名称。返回 该列名称对应的列序号 。
编码实现:
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();
}边栏推荐
- CV learning notes - edge extraction
- 01 business structure of imitation station B project
- (2)接口中新增的方法
- (1) What is a lambda expression
- Do you understand automatic packing and unpacking? What is the principle?
- Window maximum and minimum settings
- QT self drawing button with bubbles
- Tensorflow2.0 save model
- Leetcode 300 最长上升子序列
- YOLO_ V1 summary
猜你喜欢

yocto 技術分享第四期:自定義增加軟件包支持

2021-10-27

Working mode of 80C51 Serial Port

LeetCode - 5 最长回文子串

Leetcode interview question 17.20 Continuous median (large top pile + small top pile)

LeetCode - 919. Full binary tree inserter (array)

LeetCode 面试题 17.20. 连续中值(大顶堆+小顶堆)

My notes on intelligent charging pile development (II): overview of system hardware circuit design

Yocto Technology Sharing Phase 4: Custom add package support

pycharm 无法引入自定义包
随机推荐
(2)接口中新增的方法
Yocto technology sharing phase IV: customize and add software package support
The new series of MCU also continues the two advantages of STM32 product family: low voltage and energy saving
Dictionary tree prefix tree trie
QT is a method of batch modifying the style of a certain type of control after naming the control
4G module IMEI of charging pile design
Blue Bridge Cup for migrant workers majoring in electronic information engineering
Crash工具基本使用及实战分享
Opencv feature extraction sift
4G module designed by charging pile obtains signal strength and quality
01 business structure of imitation station B project
CV learning notes - BP neural network training example (including detailed calculation process and formula derivation)
Leetcode - 895 maximum frequency stack (Design - hash table + priority queue hash table + stack)*
Window maximum and minimum settings
Swing transformer details-1
My notes on intelligent charging pile development (II): overview of system hardware circuit design
2021-10-27
03 FastJson 解决循环引用
About windows and layout
CV learning notes - reasoning and training