1027. Colors in Mars (20)
来源:互联网 发布:php exec 返回127 编辑:程序博客网 时间:2024/06/06 14:11
进制转换。。
#include <cstdio>#include <vector>#include <string>#include <cstring>#include <cstdlib>#include <iostream>#include <algorithm>#define INF 0x3fffffffusing namespace std;void hs(int x){ char res[3]=""; int a,b; a=x/13; b=x%13; if (a>9) res[0]=a-10+'A'; else res[0]=a-0+'0'; if (b>9) res[1]=b-10+'A'; else res[1]=b-0+'0'; cout<<res;}int main(){ int a,b,c; cin>>a>>b>>c; cout<<'#'; hs(a); hs(b); hs(c);}
阅读全文
0 0
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- 1027. Colors in Mars (20)
- Mybatis学习(02)-入门程序
- C#窗体自适应
- Python3对一个class类型的list按class中某一属性排序
- 智能POS的密钥体系
- greenplum 在单机上安装
- 1027. Colors in Mars (20)
- vector iterator not incrementable
- 阳志平:阶级跃迁背后的残酷真相,你知道吗?
- js中的event.preventDefault()和event.stopPropagation()用法及兼容
- 软件测试分类与分级
- Recycleview的上拉刷新与下拉加载
- ES6-环境部署
- Akka(30): Http:High-Level-Api,Routing DSL
- python中的operator.itemgetter函数 operator.itemgetter函数