题解
2025-05-04 11:12:15
发布于:浙江
0阅读
0回复
0点赞
#include<iostream>
using namespace std;
int main(){
char c;
cin>>c;
if(c=='J'){
int x,y;
cin>>x>>y;
cout<<(x+y)*2<<' '<<x*y;
}else if(c=='S'){
int a,b,c;
cin>>a>>b>>c;
cout<<a+b+c;
}else{
cout<<"wrong";
}
return 0;
}
这里空空如也
有帮助,赞一个