题解|c++ & python
2025-07-23 13:41:18
发布于:上海
0阅读
0回复
0点赞
c++解法
#include <bits/stdc++.h>
using namespace std;
int main(){
char s;
cin >> s;
if(s == 'y' || s == 'Y')cout << "Yes";
if(s == 'n' || s == 'N')cout << "No";
return 0;
}
Python解法
s = str(input())
if s == 'y' or s == 'Y':
print("Yes")
elif s == 'n' or s == 'N':
print("No");
这里空空如也
有帮助,赞一个