ใน Excel คอลัมน์มีช่วงตั้งแต่A-Z, AA,AB,AZ,BA,..,BZ
และอื่น ๆ จริงๆแล้วพวกเขาแต่ละคนยืนสำหรับตัวเลข แต่จะถูกเข้ารหัสเป็นสตริงตัวอักษร
ในการท้าทายนี้คุณจะได้รับสตริงตัวอักษรและคุณจะต้องคำนวณคอลัมน์ที่สอดคล้อง
การทดสอบบางอย่าง:
'A' ส่งคืน 1 (หมายถึงเป็นคอลัมน์แรก)
'B' ส่งคืน 2
'Z' ส่งคืน 26
'AA' ส่งคืน 27
'AB' ส่งคืน 28
'AZ' ส่งคืน 52
'ZZ' ส่งคืน 702
'AAA' ส่งคืน 703
คุณสามารถสันนิษฐานได้ว่าจะให้อักษรตัวใหญ่เท่านั้น
ไบต์ที่สั้นที่สุดชนะ
โชคดี!
Z
เป็น 10 โดยอัตโนมัติ