PAT 甲级 1027 Colors in Mars
作者:互联网
PAT 甲级 1027 Colors in Mars
#include<bits/stdc++.h>
using namespace std;
char radix_13_in_mars[13] = { '0','1','2','3' ,'4' ,'5' ,'6' ,'7' ,'8',
'9','A','B','C' };
int main()
{
#ifdef LOCAL
freopen("input.txt", "r", stdin);//freopen("output.txt", "w", stdout);
#endif
int color_10;
cout << "#";
for (int i = 0; i < 3; ++i) {
cin >> color_10;
cout << radix_13_in_mars[color_10 / 13]
<< radix_13_in_mars[color_10 % 13];
}
}
标签:1027,PAT,cout,int,color,Colors,Mars,txt 来源: https://blog.csdn.net/u011917745/article/details/114220460