当前位置:网站首页>PAT甲级 1027 Colors in Mars
PAT甲级 1027 Colors in Mars
2022-07-03 07:34:00 【九是否非随机的称呼】
10进制转13进制的,要注意补齐两位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;
}边栏推荐
- 技术干货|昇思MindSpore创新模型EPP-MVSNet-高精高效的三维重建
- Take you through the whole process and comprehensively understand the software accidents that belong to testing
- Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore
- Vertx's responsive redis client
- Use of other streams
- Lucene introduces NFA
- Industrial resilience
- Lucene skip table
- Download address collection of various versions of devaexpress
- 技术干货|昇思MindSpore NLP模型迁移之Roberta ——情感分析任务
猜你喜欢
![[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)

Technical dry goods Shengsi mindspire elementary course online: from basic concepts to practical operation, 1 hour to start!

Use of other streams

Leetcode 198: house raiding

Leetcode 213: 打家劫舍 II

Technical dry goods | hundred lines of code to write Bert, Shengsi mindspire ability reward

Custom generic structure

TreeMap

Epoll related references

Wireshark software usage
随机推荐
GStreamer ffmpeg avdec decoded data flow analysis
Epoll related references
TCP cumulative acknowledgement and window value update
JUnit unit test of vertx
Technical dry goods Shengsi mindspire innovation model EPP mvsnet high-precision and efficient 3D reconstruction
Map interface and method
1. E-commerce tool cefsharp autojs MySQL Alibaba cloud react C RPA automated script, open source log
Sent by mqtt client server of vertx
Analysis of the problems of the 11th Blue Bridge Cup single chip microcomputer provincial competition
PdfWriter. GetInstance throws system Nullreferenceexception [en] pdfwriter GetInstance throws System. NullRef
IPv4 address
项目经验分享:基于昇思MindSpore,使用DFCNN和CTC损失函数的声学模型实现
[coppeliasim4.3] C calls UR5 in the remoteapi control scenario
II. D3.js draw a simple figure -- circle
论文学习——鄱阳湖星子站水位时间序列相似度研究
技术干货|关于AI Architecture未来的一些思考
TypeScript let与var的区别
Realize the reuse of components with different routing parameters and monitor the changes of routing parameters
Dora (discover offer request recognition) process of obtaining IP address
【MySQL 12】MySQL 8.0.18 重新初始化
https://github.com/ZouJiu1/PAT