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. svn权限控制

    http://blog.csdn.net/clever101/article/details/8159105 [groups] #核心层开发组成员 core_dev = lg,zjc #扩展层开发组成 ...

  2. HTML data属性简介以及低版本浏览器兼容算法

    实例 使用 data-* 属性来嵌入自定义数据: <ul> <li data-animal-type="bird">Owl</li> <l ...

  3. Linux设备驱动之semaphore机制【转】

    转自:http://blog.csdn.net/xiao229404041/article/details/7031776 Linux设备驱动之semaphore机制在Linux系统中,信号号是一种重 ...

  4. Oracle主库归档丢失,备库日志有gap,在不重建备库的情况下,恢复备库

    本文主要描述Oracle备库日志与主库日志之间有gap,切主库这部分gap的归档日志已经删除或丢失,如何在不重建备库的情况下,恢复备库. 欢迎转载,请注明作者.出处. 作者:张正 blog:http: ...

  5. weblogic .NoClassDefFoundError: Could not initialize class sun.awt.X11Graphi

    这个是常见问题,可以通过增加Weblogic的启动参数来解决: -Djava.awt.headless=true 你可以修改 startWebLogic.sh 文件. export JAVA_OPTI ...

  6. Linux系统中为php添加pcntl扩展的方法

    1.首先看下 phpize命令 所在的目录  (ps:我的目录/usr/bin/phpize)如果没有找到的话 执行安装yum install php53_devel (ps:请注意自己的版本) 安装 ...

  7. 链接注入(便于跨站请求伪造)(AppScan扫描结果)

    最近工作要求解决下web的项目的漏洞问题,扫描漏洞是用的AppScan工具,其中此篇文章是关于链接注入问题的.下面就把这块东西分享出来. 原创文章,转载请注明 -------------------- ...

  8. 20150625_Andriod_01_ListView1_条目显示

    android listview 参考地址: http://www.cnblogs.com/zhengbeibei/archive/2013/05/14/3078805.html  http://xy ...

  9. vilte/vowifi

    vendor/mediatek/proprietary/packages/services/Ims/src/com/mediatek/ims/ImsService.java ¦ ¦ ¦ ¦ ¦ ¦ v ...

  10. Javascript中setTimeout()的用法详解

    1.SetTimeOut()       1.1 SetTimeOut()语法例子       1.2 用SetTimeOut()执行Function       1.3 SetTimeout()语法 ...