# LeetCode - 0171. Excel Sheet Column Number ### 題目網址:https://leetcode.com/problems/excel-sheet-column-number/ ###### tags: `LeetCode` `Easy` `數學` ```cpp= /* -LeetCode format- Problem: 171. Excel Sheet Column Number Difficulty: Easy by Inversionpeter */ class Solution { public: int titleToNumber(string s) { int answer = 0; for (int i = 0; i != s.size(); ++i) answer = answer * 26 - 'A' + s[i] + 1; return answer; } }; ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up