Chef and Interview
All submissions for this problem are available.
One day Chef got a job offer for the position of Data Analyst in a very Famous company. He went to the company office for the interview. During the interview the interviewer got very impressed with Chef's Knowledge and Chef got the job. After the interview, the interviewer gave him an offer thet he will be offered the position of Senior Data Analyst if he can answer one question of the Interviewer. Chef agrees to take the offer. The interviewer asked chef to write a program to perform the following operation, Given a string S of binary numbers of length N he has to find the the corresponding column title as present in an Excel Sheet for the decimal representation of the string.
. . . 11010->26->Z
. . .. Being chef's friend your task is to help chef find the column title for the binary string and get the job of Senior Data Analyst.
Note: Assume there are no binary string whose decimal value is equal to 0
The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
- The first line of each test case contains a single integer N denoting the length of the binary string.
- The second line of each test case contains a string of binary numbers.
- For each test case output a single line containing the corresponding column title for the binary string.
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 104
|Tags||binary, enoc2018, rahul_ojha_07|
|Time Limit:||2 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, COB, FS|
Fetching successful submissions