码迷,mamicode.com
首页 > 其他好文 > 详细

PAT 甲级 A1027 (2019/02/08)

时间:2019-02-21 23:05:40      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:pre   bsp   div   scan   color   ret   main   can   include   

 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 }

 

PAT 甲级 A1027 (2019/02/08)

标签:pre   bsp   div   scan   color   ret   main   can   include   

原文地址:https://www.cnblogs.com/zjsaipplp/p/10415793.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!