为什么只能得四十分呢
查看原帖
为什么只能得四十分呢
759651
fengfenglong楼主2022/8/20 10:16
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <bits/stdc++.h>
#include <math.h>
#include <string>

using namespace std;
//#define PI 3.1415926
//int n;
int main()
{
int n;
string s,t;
std::cin>>n;
getline(std::cin,t);
for(int i=0;i<n;i++)
{
getline(std::cin,s);
for(int j=0;j<s.length();j++)
{
if(s[0]>='a'&&s[0]<='z')
s[0]-=32;
else if(s[j]>='A'&&s[j]<='Z')
s[j]+=32;
}
std::cout<<s<<'\n';
}
return 0;
}
2022/8/20 10:16
加载中...