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 ...
随机推荐
- hdu1754(splay tree 单点更新,成段查询)
题意就是简单的点更新,成段查询. splay tree 果真是常数比较大的log(n)操作. 比线段树还慢了这么多. // // main.cpp // splay // // Created by ...
- uva 12730(期望经典)
选自: http://blog.csdn.net/myhelperisme/article/details/39724515 用dp(n)表示有n个位置时的期望值,那么,对于一个刚进来的人来说,他有 ...
- NOIP2011提高组(选择客栈)
题目链接:http://codevs.cn/problem/1135/ 题目大意:中文题...就不解释了 题目思路:看了其他巨巨的blog写的,dp思路 #include <iostream&g ...
- 第三章 T-SQL 编程
3.1 使用变量 变量是可以存储数据值的对象.可以使用局部变量向SQL语句传递数据.在T-SQL中执行一批SQL语句时,可以声明许多变量以便临时使用.声明变量以后,可以在批处理中用一条T-SQL语句设 ...
- OAuth授权
重新梳理下授权认证模式. OWIN OWIN的英文全称是Open Web Interface for .NET.OWIN是针对.NET平台的开放Web接口. https://blog.csdn.net ...
- spring和hibernate整合时设置自动生成数据库的表
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFa ...
- jenkins配置SVN报错
jenkins配置SVN报错,如图:
- ajax异步请求分页显示
html代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset=&qu ...
- Django中_Meta 部分用法
周一了,就不长篇大论了,给大家分享一个很实用的知识点,希望大家周末过得开心,愉快,诗和远方在等着你们.而我还在苦逼的撸代码,只为了应付眼前的苟且! model.UserInfo._meta.app_l ...
- c# HttpClient获取网页源码
#region 获取网页源码 public static string HttpClientGetHtmls(string url) { try { var client = new HttpClie ...