简单题。

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; void pri(int a)
{
if (a <= ) printf("%d", a);
else printf("%c", a-+'A');
} void print(int a){
if (a >= ) { pri(a/); pri(a%);}
else { printf(""); pri(a); }
}
int main()
{
int r, g, b;
scanf("%d%d%d", &r, &g, &b);
printf("#");
print(r); print(g); print(b);
printf("\n");
return ;
}

PAT (Advanced Level) 1027. Colors in Mars (20)的更多相关文章

  1. PTA (Advanced Level) 1027 Colors in Mars

    Colors in Mars People in Mars represent the colors in their computers in a similar way as the Earth ...

  2. 【PAT甲级】1027 Colors in Mars (20 分)

    题意: 输入三个范围为0~168的整数,将它们从十三进制转化为十进制然后前缀#输出. AAAAAccepted code: #define HAVE_STRUCT_TIMESPEC #include& ...

  3. 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 ...

  4. PAT 甲级 1027 Colors in Mars (20 分)(简单,进制转换)

    1027 Colors in Mars (20 分)   People in Mars represent the colors in their computers in a similar way ...

  5. PAT (Advanced Level) Practice 1041 Be Unique (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1041 Be Unique (20 分) 凌宸1642 题目描述: Being unique is so important to peo ...

  6. PAT (Advanced Level) Practice 1046 Shortest Distance (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1046 Shortest Distance (20 分) 凌宸1642 题目描述: The task is really simple: ...

  7. PAT (Advanced Level) Practice 1042 Shuffling Machine (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1042 Shuffling Machine (20 分) 凌宸1642 题目描述: Shuffling is a procedure us ...

  8. PAT (Advanced Level) Practice 1015 Reversible Primes (20 分) 凌宸1642

    PAT (Advanced Level) Practice 1015 Reversible Primes (20 分) 凌宸1642 题目描述: A reversible prime in any n ...

  9. 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 ...

随机推荐

  1. PHP字符串函数试题

    Ctrl+A查看答案 1.把ASCII字符的字符串转换为十六进制值的函数是什么?答:bin2hex($string),例如bin2hex('ab') = 6162 2.ASCII码转字符,字符转ASC ...

  2. C#获取本机局域网ip和公网ip

    1.获取局域网ip IPAddress ipAddr = Dns.Resolve(Dns.GetHostName()).AddressList[0];//获得当前IP地址 string ip=ipAd ...

  3. ref与out之间的区别整理 摘自与望楼http://blog.csdn.net/xiaoning8201/article/details/6893154

    ref和out都是C#中的关键字,所实现的功能也差不多,都是指定一个参数按照引用传递. 对于编译后的程序而言,它们之间没有任何区别,也就是说它们只有语法区别. 总结起来,他们有如下语法区别: .ref ...

  4. 在win7/8/10鼠标右键添加按下SHIFT键时弹出的“在此处打开命令窗口”

    Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Drive\shell\cmd]@="@shell32.dll,-8506&q ...

  5. libMobileGestalt与UDID

    libMobileGestalt与UDID 没有评论 在iOS中,libMobileGestalt动态库, 用来取得各种系统变量,比如UDID, 磁盘使用量, 设备版本 在iOS7中,对于开发者来说, ...

  6. sql 日结

    --生成日结数据 ==================================== -- Author: <Author,,Name> -- Create date: <Cr ...

  7. java 读取URL中的资源

    Example13_1.java import java.net.*; import java.io.*; import java.util.*; public class Example13_1 { ...

  8. UVALive 2324 Human Gene Functions(动态规划)

    题意:求出将两个字符串改成一样长度所能形成最大的相似度. 思路:这个可以说是编辑距离的一个变形,编辑距离最终状态时要两个字符串完全一致,这个就是要求长度一样,而且这个只允许插入“—”这一个字符.模仿编 ...

  9. elasticsearch 性能调优

    所有的修改都可以在elasticsearch.yml里面修改,也可以通过api来修改.推荐用api比较灵活 1.不同分片之间的数据同步是一个很大的花费,默认是1s同步,如果我们不要求实时性,我们可以执 ...

  10. Intergate flot with Angular js ——Angular 图形报表

    下面这篇文章最终的结论就是 Flot 插件 结合 Angular 的Directive 来处理 图表的绘制 给出github上的一个demo源码.https://gist.github.com/fly ...