当前位置:网站首页>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;
}边栏推荐
- Go language foundation ----- 03 ----- process control, function, value transfer, reference transfer, defer function
- Go language foundation ------ 12 ------ JSON
- 【MySQL 13】安装MySQL后第一次修改密码,可以可跳过MySQL密码验证进行登录
- Technical dry goods | alphafold/ rosettafold open source reproduction (2) - alphafold process analysis and training Construction
- Analysis of the eighth Blue Bridge Cup single chip microcomputer provincial competition
- Unified handling and interception of exception exceptions of vertx
- Structure of golang
- 华为S5700交换机初始化和配置SSH和TELNET远程登录方法
- 【LeetCode】4. Best Time to Buy and Sell Stock·股票买卖最佳时机
- OSPF protocol summary
猜你喜欢

【CoppeliaSim4.3】C#调用 remoteApi控制场景中UR5

【LeetCode】2. Valid Parentheses·有效的括号
![[set theory] Stirling subset number (Stirling subset number concept | ball model | Stirling subset number recurrence formula | binary relationship refinement relationship of division)](/img/d8/b4f39d9637c9886a8c81ca125d6944.jpg)
[set theory] Stirling subset number (Stirling subset number concept | ball model | Stirling subset number recurrence formula | binary relationship refinement relationship of division)

Leetcode 213: looting II

【MySQL 12】MySQL 8.0.18 重新初始化

Usage of requests module

Analysis of the eighth Blue Bridge Cup single chip microcomputer provincial competition
![[mindspire paper presentation] summary of training skills in AAAI long tail problem](/img/34/9c9ec1b94edeecd4a3e7f20fdd8356.png)
[mindspire paper presentation] summary of training skills in AAAI long tail problem

Collector in ES (percentile / base)

Understanding of class
随机推荐
技术干货|昇思MindSpore可变序列长度的动态Transformer已发布!
Web router of vertx
Go language foundation ----- 06 ----- anonymous fields, fields with the same name
技术干货|AI框架动静态图统一的思考
Technical dry goods | alphafold/ rosettafold open source reproduction (2) - alphafold process analysis and training Construction
Why is data service the direction of the next generation data center?
【LeetCode】3. Merge Two Sorted Lists·合并两个有序链表
[set theory] Stirling subset number (Stirling subset number concept | ball model | Stirling subset number recurrence formula | binary relationship refinement relationship of division)
PAT甲级 1027 Colors in Mars
What did the DFS phase do
Go language foundation ----- 15 ----- reflection
PgSQL converts string to double type (to_number())
VMware network mode - bridge, host only, NAT network
Lucene merge document order
Lombok -- simplify code
Segment read
Shengsi mindspire is upgraded again, the ultimate innovation of deep scientific computing
TypeScript let与var的区别
PAT甲级 1031 Hello World for U
技术干货 | AlphaFold/ RoseTTAFold开源复现(2)—AlphaFold流程分析和训练构建
https://github.com/ZouJiu1/PAT