1027 Colors in Mars(20 分)

People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digits for Blue. The only difference is that they use radix 13 (0-9 and A-C) instead of 16. Now given a color in three decimal numbers (each between 0 and 168), you are supposed to output their Mars RGB values.

Input Specification:

Each input file contains one test case which occupies a line containing the three decimal color values.

Output Specification:

For each test case you should output the Mars RGB value in the following format: first output #, then followed by a 6-digit number where all the English characters must be upper-cased. If a single color is only 1-digit long, you must print a 0 to its left.

Sample Input:

15 43 71

Sample Output:

#123456
 #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <map>
#include <stack>
#include <vector>
#include <queue>
#include <set>
#define LL long long
using namespace std;
const int MAX = ; void calc13(int n)
{
stack <char> st;
while (n)
{
int temp = n % ;
if (temp >= ) st.push('A' + temp - );
else st.push('' + temp);
n /= ;
}
int len = - st.size();
while (len --)
cout <<'';
while (st.size())
{
cout <<st.top();
st.pop();
}
} int main()
{
int a, b, c;
// freopen("Date1.txt", "r", stdin);
scanf("%d%d%d", &a, &b, &c);
cout <<'#';
calc13(a) ,calc13(b) ,calc13(c) ,
cout <<endl;
return ;
}

最新文章

  1. Ueditor上传图片后自定义样式类名
  2. js动态时间
  3. 好老板VS坏老板
  4. Matlab与科学计算的基本运算
  5. Toolkit Pro学习--Toolbar的创建
  6. PHP设计模式之工厂模式(权限分配)
  7. 安装node配置环境变量,解决某组件(如cordova,webpack等)“不是内部命令”问题
  8. 蓝桥杯-核桃的数量-java
  9. MongoDB--MapReduce分布统计s
  10. 用css3的cursor:zoom-in/zoom-out实现微博看图片放大镜效果
  11. Git多帐号配置,管理多个SSH
  12. 你不知道的JS之 this 和对象原型(一)this 是什么
  13. Factorized Hidden Variability Learning For Adaptation Of Short Duration Language Identification Models
  14. map数据结构
  15. docker安装(2018-03-14版本)
  16. maven -- 问题解决(一)解决eclipse中maven项目配置过程和maven install时出现的问题
  17. 解决 swap file “*.swp”already exists!问题
  18. 【Luogu3676】小清新数据结构题(动态点分治)
  19. 项目笔记:list页面展示与交互设计
  20. Java权威编码规范

热门文章

  1. jquery 获取input的值
  2. 上手Typescript,让JavaScript适用于大型应用开发
  3. 对比 Git 与 SVN
  4. [POJ2356] Find a multiple 鸽巢原理
  5. 冰释前嫌——转入Android Studio与连接手机无法识别问题
  6. 利用window10的Linux子系统实现docker的安装使用
  7. Vue项目多域名跨域
  8. Javascript字符串常用方法详解
  9. PHP代码审计基础-中级篇
  10. IIS6.0使用冒号上传漏洞利用