相似与27进制的转换

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cstdlib>
#include<algorithm>
#include<stack>
using namespace std;

int main(){
    int t;
    string s;
    cin>>t;
    while(t--)
    {
        cin>>s;
        ] >= 'A') {
            ;
            int len = s.length();
            ; i<len; i++){
                res = res*+s[i]-;
            }
            cout<<res<<endl;
        } else {
            string res;
            int n = atoi(s.c_str());
            while(n){
                 == ){
                    res += 'Z';
                    n -= ;
                }
                else
                    res += n%+;
                n /= ;
            }
            reverse(res.begin(), res.end());
            cout<<res<<endl;
        }
    }
    ;
}

[河南省ACM省赛-第四届] 序号互换 (nyoj 303)的更多相关文章

  1. 河南省第四届ACM省赛(T1) 序号互换

    问题 A: 序号互换 时间限制: 1 Sec  内存限制: 128 MB难度1 题目描述 Dr.Kong设计了一个聪明的机器人卡多,卡多会对电子表格中的单元格坐标快速计算出来.单元格的行坐标是由数字编 ...

  2. [河南省ACM省赛-第四届] 表达式求值(nyoj 305)

    栈的模拟应用: #include<iostream> #include<cstdio> #include<cstring> #include<string&g ...

  3. [河南省ACM省赛-第三届] 素数 (nyoj 169)

    #include <iostream> #include <cstdio> #include <queue> #include <cstring> #i ...

  4. [河南省ACM省赛-第三届] 房间安排 (nyoj 168)

    题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=168 分析:找到一天中需要最多的房间即可 #include<iostream> ...

  5. [河南省ACM省赛-第三届] AMAZING AUCTION (nyoj 251)

    题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=251 规则: 1.若某竞标价唯一,则胜出 2.若不存在唯一竞标价,则投标次数最少竞标价中标 ...

  6. [河南省ACM省赛-第三届] 网络的可靠性 (nyoj 170)

    题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=170 根据题意,需要找到度数为1的结点个数,如下图: #include<iostre ...

  7. [河南省ACM省赛-第三届] 聪明的kk (nyoj 171)

    题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=171 动态规划: d(i,j) = max{d(i-1, j), d(i, j-1)}+m ...

  8. [河南省ACM省赛-第三届] BUYING FEED (nyoj 248)

    #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> us ...

  9. 第四届河南省ACM 序号互换 进制转换

    序号互换 时间限制: 1 Sec  内存限制: 128 MB 提交: 41  解决: 19 [提交][状态][讨论版] 题目描述 Dr.Kong设计了一个聪明的机器人卡多,卡多会对电子表格中的单元格坐 ...

随机推荐

  1. mac os apache 配置方法详细介绍

    我使用的Mac OS X版本是10.8.2,Mac自带了Apache环境. 启动Apache 设置虚拟主机 启动Apache 打开“终端(terminal)”,输入 sudo apachectl -v ...

  2. C# 添加敏感词

    public class CheckStreamReader { //使用的数据: private static HashSet<string> hash = new HashSet< ...

  3. TOGAF架构内容框架之构建块(Building Blocks)

    TOGAF架构内容框架之构建块(Building Blocks) 之前忙于搬家移居,无暇顾及博客,今天终于得闲继续我的“政治课”了,希望之后至少能够补完TOGAF方面的内容.从前面文章可以看出,笔者并 ...

  4. No object in the CompoundRoot has a publicly accessible property named

    No object in the CompoundRoot has a publicly accessible property named 'typeid' (no setter could be ...

  5. Direct2D

    Direct2D Direct2D教程III——几何(Geometry)对象 摘要: 目前博客园中成系列的Direct2D的教程有1.万一的 Direct2D 系列,用的是Delphi 20092.z ...

  6. SVN 在 Xcode中的状态说明

    最近同事总是问我关于SVN状态的问题,‘C’是什么意思啦?‘A’是什么意思啦?等等一系列问题. 为了方便以后查阅,以及新同事的快速融入,特在此记录一下^_^. 当然了大家也可以google一下,一搜一 ...

  7. Microsoft2013校园招聘笔试题

    Microsoft2013校园招聘笔试题 继续求拍砖!!!! 1. You are managing the database of a book publichser, you currently ...

  8. IOS设计模式学习(6)生成器

    1 前言 有时候,构建某些对象有多种不同方式.如果这些逻辑包含在构建这些对象的类中的单一方法中,构建的逻辑会非常荒唐(例如,针对各种构建需求的一大片嵌套if-else或者switch-case语句). ...

  9. 微信小程序开源项目库汇总

    最近做了一个微信小程序开源项目库汇总,里面集合了OpenDigg 上的优质的微信小程序开源项目库,方便移动开发人员便捷的找到自己需要的项目工具等,感兴趣的可以到GitHub上给个star. UI组件 ...

  10. ColumnEdit 数据源修改

    应用场景 当从ColumnEdit(如SearchLookUpEdit)中选取一条记录后,ColumnEdit的数据源不再出现这条记录.效果图如下 选择前 选择一条记录后,上一条记录不再显示. 此处是 ...