PAT 1027. Colors in Mars (20)
来源:互联网 发布:登陆舰升级数据 编辑:程序博客网 时间:2024/05/17 04:32
//很不好看的简单代码。。
#include<iostream>using namespace std;int a, b, c;char s[2];void to_13(int num){int b0 = num / 13, b1 = num % 13;if (b0 >= 10)s[0] = b0 - 10 + 'A';elses[0] = b0 + '0';if (b1 >= 10)s[1] = b1 - 10 + 'A';elses[1] = b1 + '0';}int main(){cin >> a >> b >> c;cout << "#";to_13(a);cout << s[0] << s[1];to_13(b);cout << s[0] << s[1];to_13(c);cout << s[0] << s[1];}
0 0
- 1027. Colors in Mars (20)-PAT
- 【PAT】1027. Colors in Mars (20)
- PAT 1027. Colors in Mars (20)
- PAT A 1027. Colors in Mars (20)
- PAT 1027. Colors in Mars (20)
- PAT 1027. Colors in Mars (20)
- pat 1027. Colors in Mars (20)
- PAT 1027. Colors in Mars (20)
- PAT 1027. Colors in Mars (20)
- PAT(A) - 1027. Colors in Mars (20)
- PAT甲级.1027. Colors in Mars (20)
- 【PAT甲级】1027. Colors in Mars (20)
- 1027. Colors in Mars (20) PAT 甲级
- PAT-A 1027. Colors in Mars (20)
- PAT甲级1027. Colors in Mars (20)
- PAT 1027. Colors in Mars (20)
- [PAT]1027. Colors in Mars (20)
- PAT-A-1027. Colors in Mars (20)
- apache服务器的安装
- centos搭建虚拟pptp
- 斯坦福大学iOS应用开发教程学习笔记(第二课)My First iOS App
- Appium Server源码分析之作为Bootstrap客户端
- 概率图模型(PGM)学习笔记(一)动机与概述
- PAT 1027. Colors in Mars (20)
- 如何解决VC中的警告Warning C4251
- 树形dp入门
- STAR面试法
- iOS工程如何支持64-bit
- Android 手把手教您自定义ViewGroup(一)
- PSIM可视化智能安防
- 概率图模型(PGM)学习笔记(二)贝叶斯网络-语义学与因子分解
- 【SGU】101. Domino 欧拉路径