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];
    }
}
上一篇:彩色螺旋线


下一篇:大乐透数据分析