3321:练54.4 整数ABC
练 54.4 整数 ABC
#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题解
洛谷python部分题解(2024.08.17)
Python学习(2024.08.01)
洛谷千题详解
洛谷千题详解 | 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题
洛谷题单···(Python)
几道洛谷Python答案解析(入门做)