FJNU 1159 Fat Brother’s new way(胖哥的新姿势)

Time Limit: 1000MS   Memory Limit: 257792K

【Description】

【题目描述】

I bet, except Fat Brothers, all of you don’t like strange way to show integers , he is really like this way to showing integers:

1 -> ‘A’

2 -> ‘B’

…….

26 -> ‘Z’

27 -> ‘AA’

28 -> ‘AB’

…….

Unfortunately, Fat Brother’s mathematics is poor, so he needs your help, he will give you some integers, and you must transform it with Fat Brother’s way.

我琢磨着,除了胖哥,没人想用如此奇葩的方式表示整数,可他总喜欢这么来写整数:

1 -> ‘A’

2 -> ‘B’

…….

26 -> ‘Z’

27 -> ‘AA’

28 -> ‘AB’

…….

不幸的是,胖哥的数学并不好,因此他需要你的帮助,他会给你一些整数,你必须把他们转化成胖哥的表示方式。

【Input】

【输入】

Input starts with an integer T(T <= 10000), denoting the number of test case.

For each test case, an integers n(1 <= n <= 2147483647) is given.

输入以一个整数T(T <= 10000)打头,表示测试用例的数量。

对于每个测试用例,都有一个整数n(1 <= n <= 2147483647)。

【Output】

【输出】

For each case, output the corresponding string with upper-case letters.

对于每个用例,输出以大写字母组成的字符串。

【Sample Input - 输入样例】

【Sample Output - 输出样例】

3

17311

2068

37

YOU

CAN

AK

【题解】

  大概意思就是10进制转26进制,不过需要注意输入数据并不是从0开始的。

  对了,G++里没有strrev这个函数

【代码 C++】

 #include<cstdio>
int main(){
char opt[];
int t, a, i;
scanf("%d", &t);
while (t--){
scanf("%d", &a);
for (i = -; a--; a /= ) opt[++i] = 'A' + a % ;
while (~i) putchar(opt[i--]);
puts("");
}
return ;
}

FJNU 1159 Fat Brother’s new way(胖哥的新姿势)的更多相关文章

  1. FJNU 1153 Fat Brother And XOR(胖哥与异或)

    FJNU 1153 Fat Brother And XOR(胖哥与异或) Time Limit: 1000MS   Memory Limit: 257792K [Description] [题目描述] ...

  2. FJNU 1155 Fat Brother’s prediction(胖哥的预言)

    FJNU 1155 Fat Brother’s prediction(胖哥的预言) Time Limit: 1000MS   Memory Limit: 257792K [Description] [ ...

  3. FJNU 1152 Fat Brother And Integer(胖哥与整数)

    FJNU 1152 Fat Brother And Integer(胖哥与整数) Time Limit: 1000MS   Memory Limit: 257792K [Description] [题 ...

  4. FJNU 1156 Fat Brother’s Gorehowl(胖哥的血吼)

    FJNU 1156 Fat Brother’s Gorehowl(胖哥的血吼) Time Limit: 1000MS   Memory Limit: 257792K [Description] [题目 ...

  5. FJNU 1151 Fat Brother And Geometry(胖哥与几何)

    FJNU 1151 Fat Brother And Geometry(胖哥与几何) Time Limit: 1000MS   Memory Limit: 257792K [Description] [ ...

  6. FJNU 1154 Fat Brother And His Love(胖哥与女神)

    FJNU 1154 Fat Brother And His Love(胖哥与女神) Time Limit: 2000MS   Memory Limit: 257792K [Description] [ ...

  7. FJNU 1157 Fat Brother’s ruozhi magic(胖哥的弱智术)

    FJNU 1157 Fat Brother’s ruozhi magic(胖哥的弱智术) Time Limit: 1000MS   Memory Limit: 257792K [Description ...

  8. HDU 4637 Rain on your Fat brother 线段与半圆和线段交 简单题

    题意: 应该不难读懂. 做法: 我们可以把雨滴看做静止不动,然后maze(这题的那个人)就是往左上方运动就可以了,计算出maze能跑到的最远的点,然后就是求起点和终点所构成的线段与每个雨滴交的时间,注 ...

  9. 大数据的胖哥的方式(9)- 金融业数据仓库的逻辑模型FS-LDM

    介绍: 大数据是不是海市蜃楼,来自小橡子只是意淫奥克斯,大数据的发展,而且要从头开始,基于大数据建设国家.项目-level数据中心行业将越来越多,大数据仅供技术,而非溶液,临数据组织模式,数据逻辑模式 ...

随机推荐

  1. gerrit-git

    解释为什么gerrit中的push是需要用refs/for/master http://stackoverflow.com/questions/10461214/why-is-git-push-ger ...

  2. 161104、NoSQL数据库:key/value型之levelDB介绍及java实现

    简介:Leveldb是一个google实现的非常高效的kv数据库,能够支持billion级别的数据量了. 在这个数量级别下还有着非常高的性能,主要归功于它的良好的设计.特别是LSM算法.LevelDB ...

  3. Web前端开发工程师面试题

    Web前端开发工程师面试题1.说说css的优先级?2.在移动端中,常常使用tap作为点击事件,好处是?会带来什么问题?3.原生JS的window,onload与Jquery的$(document).r ...

  4. Linux MTD系统剖析【转】

    转自:http://blog.csdn.net/lwj103862095/article/details/21545791 版权声明:本文为博主原创文章,未经博主允许不得转载. MTD,Memory ...

  5. tr DEMO

    测试数据: [weblogic@etp-mall-dev7][/tmp]$ cat msn.txt aaa bbb bbb ccc ccc ddd bbb eee aaa ccc bbb sss 转换 ...

  6. DomainHelper

    public class DomainHelper { public static void SetDomainValue(string key, object password) { AppDoma ...

  7. C#利用POST实现杭电oj的AC自动机器人,AC率高达50%~~

    暑假集训虽然很快乐,偶尔也会比较枯燥,,这个时候就需要自娱自乐... 然后看hdu的排行榜发现,除了一些是虚拟测评机的账号以外,有几个都是AC自动机器人 然后发现有一位作者是用网页填表然后按钮模拟,, ...

  8. easyui enableFilter combobox级联 combotree

    //网格过滤         function datagridFilter(dg){             dg.datagrid('enableFilter');             dg. ...

  9. 使用Window Live Writer写博客

    1.打开“日志账户”—>“日志选项”. 2.点击“更新账户信息”. 3.输入博客地址,用户名和密码,点击“下一步”. 4.耐心等待片刻... 5.设置“日志昵称”,点击“完成”. 这样就大功告成 ...

  10. 第十二届浙江省大学生程序设计大赛-Beauty of Array 分类: 比赛 2015-06-26 14:27 12人阅读 评论(0) 收藏

    Beauty of Array Time Limit: 2 Seconds Memory Limit: 65536 KB Edward has an array A with N integers. ...