当前位置:网站首页>Pat grade a 1027 colors in Mars
Pat grade a 1027 colors in Mars
2022-07-03 07:42:00 【IX. is it a non random title】
10 Turn into the system 13 It's binary , Pay attention to supplement the two 0
#include<iostream>
#include<vector>
#include<bits/stdc++.h>
using namespace std;
string convert13(int k){
string s;
int m, n, i;
m = k;
if(m==0) s = "00";
while(m!=0){
m = k/13;
n = k%13;
if(n==10) s += "A";
else if(n==11) s += "B";
else if(n==12) s += "C";
else s += to_string(n);
k = m;
}
reverse(s.begin(), s.end());
if(s.length()==1) return "0" + s;
return s;
}
int main(int argc, char **argv){
int a, c, w, i, j;
cin>>a>>c>>w;
cout<<"#"<<convert13(a)<<convert13(c)<<convert13(w);
return EXIT_SUCCESS;
}
边栏推荐
- Segment read
- GoLang之结构体
- Industrial resilience
- Technical dry goods Shengsi mindspire elementary course online: from basic concepts to practical operation, 1 hour to start!
- List exercises after class
- lucene scorer
- Analysis of the ninth Blue Bridge Cup single chip microcomputer provincial competition
- Analysis of the problems of the 7th Blue Bridge Cup single chip microcomputer provincial competition
- Go language foundation ----- 01 ----- go language features
- 【MySQL 11】怎么解决MySQL 8.0.18 大小写敏感问题
猜你喜欢
EtherCAT state machine transition (ESM)
UA camouflage, get and post in requests carry parameters to obtain JSON format content
技术干货|昇思MindSpore创新模型EPP-MVSNet-高精高效的三维重建
The concept of C language pointer
Shengsi mindspire is upgraded again, the ultimate innovation of deep scientific computing
项目经验分享:基于昇思MindSpore实现手写汉字识别
研究显示乳腺癌细胞更容易在患者睡觉时进入血液
Go language foundation ----- 13 ----- file
Analysis of the problems of the 7th Blue Bridge Cup single chip microcomputer provincial competition
圖像識別與檢測--筆記
随机推荐
技术干货|昇思MindSpore NLP模型迁移之Roberta ——情感分析任务
Leetcode 198: 打家劫舍
华为S5700交换机初始化和配置telnet,ssh用户方法
密西根大学张阳教授受聘中国上海交通大学客座教授(图)
Sent by mqtt client server of vertx
The difference between typescript let and VaR
Introduction of buffer flow
Go language foundation ----- 09 ----- exception handling (error, panic, recover)
不出网上线CS的各种姿势
Web router of vertx
Technical dry goods Shengsi mindspire lite1.5 feature release, bringing a new end-to-end AI experience
HDMI2.1与HDMI2.0的区别以及转换PD信号。
HarmonyOS第三次培训笔记
Go language foundation ----- 13 ----- file
Go language foundation ------17 ----- channel creation, read-write, security shutdown, multiplexing select
Go language foundation ----- 02 ----- basic data types and operators
项目经验分享:实现一个昇思MindSpore 图层 IR 融合优化 pass
c语言指针的概念
PAT甲级 1030 Travel Plan
技术干货|百行代码写BERT,昇思MindSpore能力大赏