PAT 甲级 A1027 (2019/02/08)

 1 #include<cstdio>
 2 int main(){
 3     char str[13] = {'0','1','2','3','4','5','6','7','8','9','A','B','C'};
 4     int a, b, c;
 5     scanf("%d %d %d", &a, &b, &c);
 6     printf("#");
 7     printf("%c%c",str[a/13], str[a%13]);
 8     printf("%c%c",str[b/13], str[b%13]);
 9     printf("%c%c",str[c/13], str[c%13]);
10     return 0;
11 }

猜你喜欢

转载自www.cnblogs.com/zjsaipplp/p/10415793.html