21086_AnExcel-lentProble

2022-5-16 18:18| 发布者: Hocassian| 查看: 44| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-3-89504821455899-Problem List-采集的数据-后羿采集器.html

Pro.ID

21086

Title

An Excel-lent Problem

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21086

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 1500/500 MS (Java/Others)     Memory Limit: 131072/65536 K (Java/Others)
  • 描述

    A certain spreadsheet program labels the columns of a spreadsheet using letters. Column 1 is labeled as  "A", column 2 as  "B", ..., column 26 as  "Z". When the number of columns is greater than 26, another letter is used. For example, column 27 is  "AA", column 28 is  "AB" and column 52 is  "AZ". It follows that column 53 would be " BA" and so on. Similarly, when column  "ZZ" is reached, the next column would be  "AAA", then  "AAB" and so on. 

    The rows in the spreadsheet are labeled using the row number. Rows start at 1. 

    The designation for a particular cell within the spreadsheet is created by combining the column label with the row label. For example, the upper-left most cell would be  "A1". The cell at column 55 row 23 would be  "BC23". 

    You will write a program that converts numeric row and column values into the spreadsheet designation.

    输入

    Input consists of lines of the form: RnCm. n represents the row number [1, 300000000] and m represents the column number, 1 <= m <= 300000000. The values n and m define a single cell on the spreadsheet. Input terminates with the line: R0C0 (that is, n and m are 0). There will be no leading zeroes or extra spaces in the input.

    输出

    Description
    A certain spreadsheet program labels the columns of a spreadsheet using letters. Column 1 is labeled as  "A", column 2 as  "B", ..., column 26 as  "Z". When the number of columns is greater than 26, another letter is used. For example, column 27 is  "AA", column 28 is  "AB" and column 52 is  "AZ". It follows that column 53 would be " BA" and so on. Similarly, when column  "ZZ" is reached, the next column would be  "AAA", then  "AAB" and so on. 

    The rows in the spreadsheet are labeled using the row number. Rows start at 1. 

    The designation for a particular cell within the spreadsheet is created by combining the column label with the row label. For example, the upper-left most cell would be  "A1". The cell at column 55 row 23 would be  "BC23". 

    You will write a program that converts numeric row and column values into the spreadsheet designation.
    Input
    Input consists of lines of the form: RnCm. n represents the row number [1, 300000000] and m represents the column number, 1 <= m <= 300000000. The values n and m define a single cell on the spreadsheet. Input terminates with the line: R0C0 (that is, n and m are 0). There will be no leading zeroes or extra spaces in the input.
    Output
    For each line of input (except the terminating line), you will print out the spreadsheet designation for the specified cell as described above.
    Sample Input
    R1C1
    R3C1
    R1C3
    R299999999C26
    R52C52
    R53C17576
    R53C17602
    R0C0
    Sample Output
    A1
    A3
    C1
    Z299999999
    AZ52
    YYZ53
    YZZ53
    Source

    样例输入

    R1C1
    R3C1
    R1C3
    R299999999C26
    R52C52
    R53C17576
    R53C17602
    R0C0

    样例输出

    A1
    A3
    C1
    Z299999999
    AZ52
    YYZ53
    YZZ53

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部