ICode9

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

【无标题】

2022-01-18 12:31:26  阅读:173  来源: 互联网

标签:单元格 column 无标题 number coordinates cell numbers


2022.1.18

题目网址:

https://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.

输入:

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 .

输出:

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

翻译:

描述:

在受欢迎的电子表格体系中(例如,在Excel中)以下列的计数被用到。第一列有数字A,第二-数字B,等等。第26列数字标记为Z。然后现在这儿有两个字母:列27是数字AA,列28是AB,列52标记为AZ。在ZZ之后是3个字母的数字,等等。

每一行被标记为由1开始的整数。单元格名称由行和列组成。例如,BC23是在55列,23行的单元格的名字。有时候另一个计数系统也会被使用:RXCY,这里的X和Y是整数,分别代表着列和行数。例如,R23C55是前一个例子的单元格的名字。

你的任务是去写一个能读出被给的单元格坐标序列并且可以根据另一个计数体系规则产生每个对应的项目名的程序。

输入:

输入的第一行包含了整数n(1<=n<=10^5),是测试坐标样例的数量。接下来的n行,每行包含一个坐标。所有的坐标都是正确的,所有单元格的行或者列都不超过10^6。

输出:

写下n行,每行应该包含在另一个计数系统对应的这个单元格坐标。

标签:单元格,column,无标题,number,coordinates,cell,numbers
来源: https://blog.csdn.net/qq_61768389/article/details/122557395

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

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

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

ICode9版权所有