CF1B--Spreadsheet翻译

原题链接--https://acs.jxnu.edu.cn/problem/CF1Bhttps://acs.jxnu.edu.cn/problem/CF1B

Spreadsheet

 10000ms  65536K

描述:

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.

译文:

在受欢迎的电子制表软件系统(例如,Excel)使用以下的纵行编号规则。第1纵行为A,第2纵行为B......一直到第26纵行标号为Z。接下来的标号有两个字母:第27纵行为AA,第28纵行--AB,第52纵行标为AZ。在ZZ之后用3个字母标号,以此类推。

横行以数字来标号,开始一行用1。每一单元格的名字与横行和纵行有关。例如,BC23是第55列,第23行。

有时候也会用其他的编号系统:RXCY,X和Y分别代表行和列的标号。例如,R23Y55和上个例子一样。

你的任务是写一个程序,用另一种编号系统写出按顺序给的其中一种编号系统的标号。

输入:

The first line of the input contains integer number n (1 ≤ n ≤ 105), the number of coordinates in the test. Then there follow n lines, each of them contains coordinates. All the coordinates are correct, there are no cells with the column and/or the row numbers larger than 106 .

译文:

第一行的输入包含字母n(1<=n<=105),数字坐标在测试样例中。接下来的n行,每一行的输入包含一个坐标。所有的坐标都是正确的,所有单元格的行和列号都不大于106。

输出:

Write n lines, each line should contain a cell coordinates in the other numeration system.

译文:

输出n行,每一行应该包含一个用另外一种编号系统标号的坐标。

样例输入:

2
R23C55
BC23

样例输出:

BC23
R23C55
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值