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数据中心行业将越来越多,大数据仅供技术,而非溶液,临数据组织模式,数据逻辑模式 ...
随机推荐
- ubuntu安装遇到的问题
检查磁盘发现严重错误 解决办法 进入ubuntu启动菜单,选中*ubuntu后按e进入启动项编辑模式,找到ro rootflags=sync把ro改成rw,再按F10启动 启动后打开终端termina ...
- CSS的样式合并与模块化
by zhangxinxu from http://www.zhangxinxu.com 原文地址:http://www.zhangxinxu.com/wordpress/?p=931 一.引言 本文 ...
- 阅读推荐——深入浅出Mesos
深入浅出Mesos(一):为软件定义数据中心而生的操作系统http://www.infoq.com/cn/articles/analyse-mesos-part-01 深入浅出Mesos(二):Mes ...
- node-webkit教程<>Native UI API 之Menu(菜单)
node-webkit教程(6)Native UI API 之Menu(菜单)1 前言... 2 6.1 Menu 概述... 3 6.2 menu api6 6.2.1 new Menu([o ...
- hdwiki 在IIS 下的伪静态
HDwiki有SEO设置的功能,此功能可以将HDwiki的页面进行URL静态化转换,从而使HDwiki内容更容易被搜索引擎挖掘,提高被收录的机率.注意事项 1.本功能对服务器环境有特殊要 ...
- hdwiki 数据库结构说明
HDWiki数据库结构说明 以下标有“A”的表示该列为自增列,标有“P”的表示该列为主码,标有“I”的表示该列为索引列,标有“U”的表示该列为唯一列,标有“F”的表示全文搜索. ...
- java 面试每日一题
题目:一球从100米高度自由落下,每次落地后反跳回原高度的一半:再落下,求它在 第10次落地时,共经过多少米?第10次反弹多高? import java.util.Scanner; public cl ...
- JavaScript DOM 编程艺术(第2版)读书笔记(3)
DOM DOM:文档对象模型: 节点 元素节点:DOM的原子是元素节点.<body>.<p>.<ul>之类的元素.元素可以包含其他的元素.没有被包含在其他元素里的唯 ...
- C#的OpenFileDialog和SaveFileDialog的常见用法(转)
OpenFileDialog openFileDialog1 = new OpenFileDialog(); openFileDialog1.InitialDirectory = ...
- 深入学习netty系列(1)
一.Server端的编程模型 示例代码1 EventLoopGroup bossGroup = new NioEventLoopGroup(1); EventLoopGroup workerGroup ...