1027 Colors in Mars (20 分)】的更多相关文章

1027 Colors in Mars (20 分)   People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and th…
PAT (Advanced Level) Practice 1027 Colors in Mars (20 分) 凌宸1642 题目描述: People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for R…
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digits for Blue. The…
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digits for Blue. The…
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digits for Blue. The…
题意: 输入三个范围为0~168的整数,将它们从十三进制转化为十进制然后前缀#输出. AAAAAccepted code: #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; ][]; int main(){ int a,b,c; cin>>a>>b>>c; ; while(a){ ; ) ans[][++cnt]='A'; ) ans[][++cnt]='B';…
题目:http://pat.zju.edu.cn/contests/pat-a-practise/1027 简单题,考察十进制数和n进制数的转换和输出格式的控制. People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digi…
题目 People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digits for Blue.…
#include <stdio.h> #include <map> using namespace std; int main() { int R,G,B,i; map<int,char> mm; ;i <= ;i++) mm[i]='+i; ;i<=;i++) mm[i]=i-+'A'; while(scanf("%d%d%d",&R,&G,&B)!=EOF) printf(],mm[R%],mm[G/],mm[…
简单题. #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> using namespace std; void pri(int a) { ) printf("%d", a); +'A'); } void print(int a){ ) { pri(a/); pri(a%);} "); pri(a); } } int main() { in…
#include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #include <cmath> #include <queue> using namespace std; ]; ]={','A','B','C'}; int main() { scanf(],&color[],&color[]); printf("#…
1027 Colors in Mars (20)(20 分) People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and…
1027 Colors in Mars (20 分) People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the…
1027 Colors in Mars (20 分) People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the…
1027 Colors in Mars(20 分) People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the l…
A1027 Colors in Mars (20)(20 分) People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and…
1027 Colors in Mars (20 分)   People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and th…
1027 Colors in Mars People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2…
Colors in Mars People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digit…
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digits for Blue. The…
[题目链接] People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digits for Bl…
https://pintia.cn/problem-sets/994805342720868352/problems/994805470349344768 People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits a…
#include <iostream> using namespace std; string tbl="0123456789ABC"; int main() { int a,b,c; cin>>a>>b>>c; int al=a%13,ah=a/13; int bl=b%13,bh=b/13; int cl=c%13,ch=c/13; cout<<"#"; cout<<tbl[ah]<&…
#include <cstdio> char radix[13] = {'0','1','2','3','4','5','6','7','8','9','A','B','C'}; int main() { int g,r,b; scanf("%d%d%d",&g,&r,&b); printf("#"); printf("%c%c%c%c%c%c",radix[g/13],radix[g%13],radix[r/…
AC代码 #include <cstdio> const int max_n = 1000; int ans[max_n]; char result[max_n]; char radix[13] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C'}; int time = 0; void change(int a) { int num = 0; if(a <= 13) { //根据位数来确定是否需要输出多余…
1027. Colors in Mars (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the…
1100 Mars Numbers(20 分) People on Mars count their numbers with base 13: Zero on Earth is called "tret" on Mars. The numbers 1 to 12 on Earch is called "jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec" on Mars, respectively.…
1041 Be Unique (20 分) Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10​4​​]. The first one who bets on a unique number wins. For…
1054 The Dominant Color (20 分) Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the dominant color. A st…
1041 Be Unique (20 分) Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10​4​​]. The first one who bets on a unique number wins. For…