codeforces-1B-Spreadsheets( C++ && PHP && 字符串操作 && 数学逻辑 )

该博客介绍了如何在流行的电子表格系统中,如Excel,将字母数字的列编号与整数的行编号进行相互转换。讨论了如何从AA, AB等形式的列名转换为数字,以及如何将RXCY形式的坐标转换为字母数字表示。内容包括处理超过26列的多字母列名和大于1的行号。读者将学习到一种算法,用于在两种坐标系统间转换单元格名称。" 107478018,8765397,C++迭代器详解:类型与操作,"['C++', '数据结构']

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

B. Spreadsheets
time limit per test
10 seconds
memory limit per test
64 megabytes
input
standard input
output
standard output

In the popular spreadsheets systems (for example, in Excel) the following numeration of columns is used. The first column has number A, the second — number B, etc. till column 26 that is marked by Z. Then there are two-letter numbers: column 27 has number AA, 28 — AB, column 52 is marked by AZ. After ZZ there follow three-letter numbers, etc.

The rows are marked by integer numbers starting with 1. The cell name is the concatenation of the column and the row numbers. For example, BC23 is the name for the cell that is in column 55, row 23.

Sometimes another numeration system is used: RXCY, where X and Y are integer numbers, showing the column and the row numbers respectfully. For instance, R23C55 is the cell from the previous example.

Your task is to write a program that reads the given sequence of cell coordinates and produce each item written according to the rules of another numeration system.

Input

The first line of the input contains integer number n (1 ≤ n ≤ 10

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值