FJNU 1159 Fat Brother’s new way(胖哥的新姿势)
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(胖哥的新姿势)的更多相关文章
- FJNU 1153 Fat Brother And XOR(胖哥与异或)
		FJNU 1153 Fat Brother And XOR(胖哥与异或) Time Limit: 1000MS Memory Limit: 257792K [Description] [题目描述] ... 
- FJNU 1155 Fat Brother’s prediction(胖哥的预言)
		FJNU 1155 Fat Brother’s prediction(胖哥的预言) Time Limit: 1000MS Memory Limit: 257792K [Description] [ ... 
- FJNU 1152 Fat Brother And Integer(胖哥与整数)
		FJNU 1152 Fat Brother And Integer(胖哥与整数) Time Limit: 1000MS Memory Limit: 257792K [Description] [题 ... 
- FJNU 1156 Fat Brother’s Gorehowl(胖哥的血吼)
		FJNU 1156 Fat Brother’s Gorehowl(胖哥的血吼) Time Limit: 1000MS Memory Limit: 257792K [Description] [题目 ... 
- FJNU 1151 Fat Brother And Geometry(胖哥与几何)
		FJNU 1151 Fat Brother And Geometry(胖哥与几何) Time Limit: 1000MS Memory Limit: 257792K [Description] [ ... 
- FJNU 1154 Fat Brother And His Love(胖哥与女神)
		FJNU 1154 Fat Brother And His Love(胖哥与女神) Time Limit: 2000MS Memory Limit: 257792K [Description] [ ... 
- FJNU 1157 Fat Brother’s ruozhi magic(胖哥的弱智术)
		FJNU 1157 Fat Brother’s ruozhi magic(胖哥的弱智术) Time Limit: 1000MS Memory Limit: 257792K [Description ... 
- HDU 4637 Rain on your Fat brother 线段与半圆和线段交 简单题
		题意: 应该不难读懂. 做法: 我们可以把雨滴看做静止不动,然后maze(这题的那个人)就是往左上方运动就可以了,计算出maze能跑到的最远的点,然后就是求起点和终点所构成的线段与每个雨滴交的时间,注 ... 
- 大数据的胖哥的方式(9)- 金融业数据仓库的逻辑模型FS-LDM
		介绍: 大数据是不是海市蜃楼,来自小橡子只是意淫奥克斯,大数据的发展,而且要从头开始,基于大数据建设国家.项目-level数据中心行业将越来越多,大数据仅供技术,而非溶液,临数据组织模式,数据逻辑模式 ... 
随机推荐
- android 项目学习随笔六(网络缓存)
			1. 对SharePreference的封装 import android.content.Context; import android.content.SharedPreferences; /** ... 
- sql基础查询
			2.1 指定使用中的资料库 一个资料库伺服器可以建立许多需要的资料库,所以在你执行任何资料库的操作前,通常要先指定使用的资料库.下列是指定资料库的指令: 如果你使用「MySQL Workbench」这 ... 
- 由于 add 运算符中“Chinese_PRC_CI_AS”和“Chinese_PRC_CS_AS_WS”之间的排序规则冲突
			有一个字段的排序规则是 Chinese_PRC_CS_AS_WS,字符串连接的时候报错. 处理方案 cast(columnName as varbinary) 即可 
- Java编译那些事儿【转】
			转自:http://blog.csdn.net/lincyang/article/details/8553481 版权声明:本文为博主原创文章,未经博主允许不得转载. 目录(?)[-] 命令行编译 使 ... 
- 有关对字符串的处理,需要用到List时的简化写法
			这是项目中的需要根据ComputerName来获取IP的一个方法,如果出现多个ComputerName,需要将多个ComputerName的字符串以“:”分开,传进方法中,然后再处理不同的Name,然 ... 
- 在Java中导出word、excel格式文件时JSP页面头的设置
			我们在JSP中往往会把一些表格里的东西需要导出到本地,一般都是导成word.excel格式的文件.这只需要在JSP页面头设置及在<head></head>标签中添加下面的代码: ... 
- Uva 11754 Code Feat
			题意概述: 有一个正整数$N$满足$C$个条件,每个条件都形如“它除以$X$的余数在集合$\{Y_1, Y_2, ..., Y_k\}$中”,所有条件中的$X$两两互质, 你的任务是找出最小的S个解. ... 
- JQuery的$(document).ready(function(){})与JS的window.onload 的各自优势!
			由于项目需要,使用JQuery也有相当一段时间了.由于经常要处理DOM节点加载.图片显示以及动态资源请求,所以对$(document).ready(function(){})理解也越来越深了,所有在此 ... 
- HTML+CSS编写规范
			在任何一个项目或者系统开发之前都需要定制一个开发约定和规则,这样有利于项目的整体风格统一.代码维护和扩展.由于Web项目开发的分散性.独立性.整合的交互性等,所以定制一套完整的约定和规则显得尤为重要. ... 
- HTML5视频标签video
			现阶段,我们要在网页中嵌入视频的最可靠最常用的办法是使用Flash,通过使用<object>和<embed>标签,就可以通过浏览器播放swf,flv等格式视频文件,但是前提是浏 ... 
