PAT1027. Colors in Mars (20)
#include <iostream> using namespace std;
string tbl="0123456789ABC";
int main()
{
int a,b,c;
cin>>a>>b>>c;
int al=a%13,ah=a/13;
int bl=b%13,bh=b/13;
int cl=c%13,ch=c/13;
cout<<"#";
cout<<tbl[ah]<<tbl[al];
cout<<tbl[bh]<<tbl[bl];
cout<<tbl[ch]<<tbl[cl]; return 0;
}
PAT1027. Colors in Mars (20)的更多相关文章
- PAT1027 Colors in Mars (20分) 10进制转13进制
题目 People in Mars represent the colors in their computers in a similar way as the Earth people. That ...
- PAT1027:Colors In Mars
1027. Colors in Mars (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue People ...
- A1027 Colors in Mars (20)(20 分)
A1027 Colors in Mars (20)(20 分) People in Mars represent the colors in their computers in a similar ...
- PAT 甲级 1027 Colors in Mars (20 分)(简单,进制转换)
1027 Colors in Mars (20 分) People in Mars represent the colors in their computers in a similar way ...
- PAT (Advanced Level) Practice 1027 Colors in Mars (20 分) 凌宸1642
PAT (Advanced Level) Practice 1027 Colors in Mars (20 分) 凌宸1642 题目描述: People in Mars represent the c ...
- 1027. Colors in Mars (20) PAT
题目:http://pat.zju.edu.cn/contests/pat-a-practise/1027 简单题,考察十进制数和n进制数的转换和输出格式的控制. People in Mars rep ...
- PAT Advanced 1027 Colors in Mars (20 分)
People in Mars represent the colors in their computers in a similar way as the Earth people. That is ...
- PAT (Advanced Level) Practice 1027 Colors in Mars (20 分)
People in Mars represent the colors in their computers in a similar way as the Earth people. That is ...
- 1027 Colors in Mars (20 分)
People in Mars represent the colors in their computers in a similar way as the Earth people. That is ...
随机推荐
- Django项目部署(django+guncorn+virtualenv+nginx)
一.说明 为了django项目部署到生产环境上,能够稳定的运行,且能够同时指出http和https的访问,对django的部署进行了一些研究,决定采用django + gunicorn + virtu ...
- Intellij IDEA快捷键及常见问题
在java学习与开发中经常使用Intellij IDEA,为提高效率会使用快捷方式. 现在记录下经常使用到快捷键: Ctr l+ O 快速重写父类方法 Ctrl + Shift + / xml注释&l ...
- JavaScript数据结构与算法-集合练习
集合的实现 function Set () { this.dataStore = []; this.add = add; this.remove = remove; this.size = size; ...
- Python3.6全栈开发实例[021]
21.给出一个纯数字列表. 请对列表进行排序(升级题). 思路: (1)完成a和b的数据交换. 例如, a = 10, b = 24 交换之后, a = 24, b = 10(2)循环列表. 判断a[ ...
- 使用Kotlin开发Android应用 - 环境搭建 (1)
一. 在Android Studio上安装Kotlin插件 按快捷键Command+, -> 在Preferences界面找到Plugins -> 点击Browse repositorie ...
- tfboys——tensorflow模块学习(四)
tensorflow功能函数 tf.abs 计算张量的绝对值 abs ( x , name = None ) 定义在:tensorflow/python/ops/math_ops.py. 参考指南:数 ...
- PowerDesigner数据模型(CDM—PDM)
操作过程 点击: Tools/Generate Physical Data Model
- HTTP首部信息说明
1.Accept:告诉WEB服务器自己接受什么介质类型,*/* 表示任何类型,type/* 表示该类型下的所有子类型,type/sub-type.2.Accept-Charset:浏览器申明自己接收的 ...
- 【深度学习】使用opencv在视频上添加文字和标记框
深度学习识别出视频的物体之后,需要在视频上画框标记出来. 接下来介绍如何使用python在视频上画框和文字 #!/usr/bin/env python # -*- coding:utf-8 -*- i ...
- Android 结束进程的方法forceStopPackage
ActivityManager sd = (ActivityManager) this.getSystemService(ACTIVITY_SERVICE); Method method = Clas ...