3321:练54.4 整数ABC

3321:练54.4 整数ABC

信息学奥赛一本通-编程启蒙(C++版)在线评测系统

练 54.4 整数 ABC

信息学奥赛一本通-编程启蒙(C++版)在线评测系统




#include<bits/stdc++.h>
using namespace std;
int main() {
 
    int a[10];
    string s;
 
    for (int i = 1; i <= 3; i++)cin >> a[i];
    cin >> s;
 
    sort(a + 1, a + 1 + s.length());
    for (int i = 0; i <= 2; i++) {
 
        cout << a[s[i] - 64] << " ";
    }
 
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a[3+5];
    string str;
    cin>>a[1]>>a[2]>>a[3];
    cin>>str;
    sort(a+1,a+3+1);
    
    for(int i=0;i<3;i++)
    {
    	if( str[i]=='A' )
    	{
    		cout<<a[1]<<" ";
		}
		else
		{
			if( str[i]=='B' )
			{
				cout<<a[2]<<" ";
			}
			else
			{
				cout<<a[3]<<" ";
			}
		}
	}
    
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int main()
{
	int a[5];
	scanf("%d%d%d\n",&a[0],&a[1],&a[2]);
	string s;
	getline(cin,s);
	sort(a,a+3);
	for(int i=0;i<3;i++){
		if(s[i]=='A'){
			cout<<a[0]<<" ";
		}else if(s[i]=='B'){
			cout<<a[1]<<" ";
		}else if(s[i]=='C'){
			cout<<a[2]<<" ";
		}
	}
	return 0;
}



 




NOI题库 python题解

https://blog.csdn.net/dllglvzhenfeng/category_11601976.html

洛谷python部分题解(2024.08.17)

洛谷python部分题解(2024.08.17)-CSDN博客

Python学习(2024.08.01)

Python学习(2024.08.01)-CSDN博客




洛谷千题详解

https://blog.csdn.net/djfihhfs/category_12079613.html

洛谷千题详解 | P1002 [NOIP2002 普及组] 过河卒【C++、 Java、Python语言】

洛谷千题详解 | P1002 [NOIP2002 普及组] 过河卒【C++、 Java、Python语言】_洛谷过河卒-CSDN博客

洛谷千题详解 | P1003 [NOIP2011 提高组] 铺地毯【C++、 Java、Python语言】

洛谷千题详解 | P1003 [NOIP2011 提高组] 铺地毯【C++、 Java、Python语言】_c++铺地毯模拟算法-CSDN博客

pytnon3解洛谷入门题前15题

pytnon3解洛谷入门题前15题_洛谷python-CSDN博客

洛谷题单···(Python)

洛谷题单···(Python)_洛谷b2008答案-CSDN博客

几道洛谷Python答案解析(入门做)

几道洛谷Python答案解析(入门做)_洛谷 python-CSDN博客

  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

dllglvzhenfeng

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值