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数据中心行业将越来越多,大数据仅供技术,而非溶液,临数据组织模式,数据逻辑模式 ...
随机推荐
- JNI 概述【转】
本文转载自:http://wiki.jikexueyuan.com/project/jni-ndk-developer-guide/overview.html 相信很多做过 Java 或 Androi ...
- centos环境源码安装postgresql9.4
源码安装简要步骤 下载PostgreSQL 源码包 下载根目录地址:http://ftp.postgresql.org/ 本人选择的是当前最新版本v9.4.1:http://ftp.postgre ...
- C#:控制WinForm界面的显示
控制WinForm界面在屏幕的四个角落显示,具体代码中有说明: using System; using System.Collections.Generic; using System.Drawing ...
- SQL SERVER 数据库实用SQL语句
--查看指定表的外键约束 select * from sysobjects where parent_obj in( select id from sysobjects where name='表名' ...
- java中@value的环境配置
@value 在现阶段我想大家对注解都不陌生,@value的用法就是在后台获取配置文件的信息,从而方便修改一些固定的配置.不明白的可以百度@value的详解. 配置@value有以下几个步骤. 1.首 ...
- 20151224001 GridView 多按钮的各种使用方法
<asp:GridView ID="GridView1" runat="server" AllowPaging=" ...
- DZY Loves Chemistry 分类: CF 比赛 图论 2015-08-08 15:51 3人阅读 评论(0) 收藏
DZY Loves Chemistry time limit per test 1 second memory limit per test 256 megabytes input standard ...
- 测试Animation大型动画文件拆分播放的可行性
最近遇到一个问题,剧情动画文件大了复杂了之后,每次修改输出很麻烦,导出fbx就需要20分钟. 所以我想到了一个比较好的解决方法,在unity这边解决.把动画文件拆分成若干份,然后赋予不同的层并行播放 ...
- 浅谈MySQL索引背后的数据结构及算法(转载)
转自:http://blogread.cn/it/article/4088?f=wb1 摘要 本文以MySQL数据库为研究对象,讨论与数据库索引相关的一些话题.特别需要说明的是,MySQL支持诸多存储 ...
- POJ Sky Code 莫比乌斯反演
N. Sky Code Time Limit: 1000ms Case Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO for ...