ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

翻译训练 Day2

2022-01-18 20:34:45  阅读:197  来源: 互联网

标签:翻译 训练 column 单元格 Day2 number coordinates cell numbers


题目:Spreadsheet | JXNUOJ

翻译:

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.

在流行的电子表格系统(比如Excel)。第一列有数字A,第二列有数字B,一直到数字Z一共有26列。接着由两个英文数字组成:第27列有数字AA,第28列有数字AB,一直到数字AZ有52列。然后由三个英文字母组成,以此类推。

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.

行被从1开始的整数标记。单元名字是行和列的合并,比如,BC23是第55列,第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.

有时候也会使用到别的电子表格系统:RXCY。在这个系统中,X和Y是整数,代表了列和行。比如:R23C55是第23行第55列

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.

你的任务是写一个程序,它能够读取给定的单元格序列然后根据另一个电子表格系统的规则输出对应的单元格序列。

输入:

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

标签:翻译,训练,column,单元格,Day2,number,coordinates,cell,numbers
来源: https://www.cnblogs.com/shw940795634/p/15819647.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有