当前位置:网站首页>Who is the winner of PTA
Who is the winner of PTA
2022-07-06 02:54:00 【weCream】

answer :
#include<stdio.h>
int main(){
int n,m,i,j,k,l,t;
scanf("%d%d",&n,&m);
int a[3],num=0;
for(i=0;i<3;i++)
scanf("%d",&a[i]);
int flag=0;
if(n>m){
for(i=0;i<3;i++){
if(a[i]==0)
num++;
}
if(num!=0){
printf("The winner is a: %d + %d",n,num);
}
else printf("The winner is b: %d + 3",m);
}
else{
for(i=0;i<3;i++){
if(a[i]==1)
num++;
}
if(num!=0){
printf("The winner is b: %d + %d",m,num);
}
else printf("The winner is a: %d + 3",n);
}
}

Limited ability , The code is not concise enough , I hope the boss will criticize and correct me .
边栏推荐
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 13
- 会员积分营销系统操作的时候怎样提升消费者的积极性?
- Self made CA certificate and SSL certificate using OpenSSL
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15
- Zhang Lijun: penetrating uncertainty depends on four "invariants"
- Codeworks 5 questions per day (1700 average) - day 6
- 不赚钱的科大讯飞,投资价值该怎么看?
- 微软语音合成助手 v1.3 文本转语音工具,真实语音AI生成器
- 技术分享 | undo 太大了怎么办
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8
猜你喜欢

【Unity3D】GUI控件

ReferenceError: primordials is not defined错误解决
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 13](/img/29/49da279efed22706545929157788f0.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 13
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7](/img/44/1861f9016e959ed7c568721dd892db.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7

Taobao focus map layout practice
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21](/img/73/4050a592fdd99bf06e8fd853b157b6.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21

Yyds dry inventory comparison of several database storage engines
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 10](/img/89/1c2f98973b79e8d181c10d7796fbb5.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 10
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15](/img/72/0fe9cb032339d5f1ccf6f6c24edc57.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15

Installation and use tutorial of cobaltstrike-4.4-k8 modified version
随机推荐
Fault analysis | analysis of an example of MySQL running out of host memory
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 17
Introduction to robotframework (III) Baidu search of webui automation
[kubernetes series] learn the exposed application of kubernetes service security
Atcoder beginer contest 233 (a~d) solution
RobotFramework入门(三)WebUI自动化之百度搜索
[Chongqing Guangdong education] higher mathematics I reference materials of Southwest Petroleum University
Redis installation
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 24
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15
tcpdump: no suitable device found
Pure QT version of Chinese chess: realize two-man, man-machine and network games
微服务注册与发现
[ruoyi] set theme style
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 9
Redis delete policy
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20
Follow the mouse's angle and keyboard events
纯Qt版中国象棋:实现双人对战、人机对战及网络对战