当前位置:网站首页>ASCII code sorting
ASCII code sorting
2022-07-29 17:15:00 【seal ink】
ASCII码排序
时间限制: 3 Sec 内存限制: 64 MB
题目描述
输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个字符.
输入
第一行输入一个数N,表示有N组测试数据.后面的N行输入多组数据,每组输入数据都是占一行,有三个字符组成,之间无空格.
输出
对于每组输入数据,输出一行,字符中间用一个空格分开.
样例输入
2
qwe
asd
样例输出
e q w
a d s
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
getchar();
while(n--)
{
char a,b,c,t;
scanf("%c%c%c",&a,&b,&c);
getchar();
if(a>b)
{
t=a;
a=b;
b=t;
}
if(b>c)
{
t=b;
b=c;
c=t;
}
if(a>b)
{
t=a;
a=b;
b=t;
}
printf("%c %c %c\n",a,b,c);
}
return 0;
}边栏推荐
- 阶乘因式分解
- ASCII码排序
- ByteArrayOutputStream class source code analysis
- Google Play 政策更新 | 2022 年 7 月
- 支持百亿请求的微博广告运维技术实践
- 阅读顺序
- MUD DAO火爆入世,DAO主轮募集蓄势待发
- Tech Talk 活动回顾|基于 Amazon KVS 打造智能视觉产品
- 中国厂商统治印度智能手机市场,份额提升至77%
- This article penetrates the architecture design and cluster construction of the distributed storage system Ceph (hands-on)
猜你喜欢

PL5902 SOT-23-5 高效1MHz2A同步DC-DC降压调节器 百盛电子代理商

MLX90640 infrared thermal imager development notes (9)

Dry goods!How to Construct SRv6-TE Performance Test Environment Using Instrumentation

【PCL学习笔记】点云处理常用的库和API(PCL库+Eigen)

Groeb - "gramm, explicit and complete n -" gramm mask language model, implements the explicit n - "gramm semantic unit modeling knowledge.

CAS原理以及ABA问题解决Demo-代码

Knowledge map construction whole process

Easy Genes: Human tRNA loci exhibit DNA hypermethylation associated with aging | Research Article

【服务器存储数据恢复】华为OceanStor某型号存储raid5硬盘故障离线,热备盘同步数据失败导致raid崩溃的数据恢复案例

大规模线上应用TiDB会遇到的坑,本文都帮你排除好了
随机推荐
R语言中给数据框增加分组/根据样本名称添加分组的代码
最新!多交的税可以退,同学,你今天退税了吗?
传输层 TCP的连接管理-释放连接四次握手
浅谈程序的内存布局
中小型金融企业该如何进行灾备建设?
RocketQA: across batches negative sampling (cross - batch negatives), the denoising of strong negative cases of sampling (denoised hard negative from) and data to enhance (data augment
When to use UserCF and when to use ItemCF?
掘金量化:通过history方法获取数据,和新浪财经,雪球同用等比复权因子。不同于同花顺
可行性研究报告模板
HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
TensorFlow Serving 高性能的机器学习模型服务系统
地平线获得舜宇集团战略投资并与舜宇智领签署战略合作协议
Pycaret on diamond data sets using the regression problem
Flutter dynamic | Fair server new version features
【高并发】我用多线程进一步优化了亿级流量电商业务下的海量数据校对系统,性能再次提升了200%!!(全程干货,建议收藏)
MQTT over QUIC:下一代物联网标准协议为消息传输场景注入新动力
uni-app深入学习之模板运用
节省70%的显存,训练速度提高2倍!浙大&阿里提出在线卷积重新参数化OREPA,代码已开源!(CVPR 2022 )...
知识图谱构建全流程
再见Postman!一款更适合国人的接口管理工具