This commit is contained in:
Meizar 2025-08-01 06:36:02 +07:00
parent fcb1f741b9
commit ce95630cc6
4 changed files with 28 additions and 17 deletions

View file

@ -14,4 +14,23 @@ public static class Helper
}
return result;
}
public static (int Row, int Col) ToRowCol(string letters)
{
int row = 0;
int col = 0;
foreach (var item in letters)
{
if (item >= 'A')
{
row = row * 26 + (item - 'A' + 1);
}
else if (item >= '0')
{
col = col * 10 + (item - '0');
}
}
return (row, col);
}
}