题解:P11019 「LAOI-6」[太阳]] 请使用最新版手机 QQ 体验新功能
第一次写题解,有点紧张QwQ
这题考察字符串的应用。
设输入字符串为 (不是C++语法里的指针),从
#include <bits/stdc++.h>
#define N 114514
#define ll long long
using namespace std;
string s, ans;
int main(){
ios::sync_with_stdio(0);
cin.tie(0),cout.tie(0);
cin >> s;
int now = 1; //指针指向第一个字母
while(s[now] != ']'){ //枚举到]
if(isupper(s[now])){ //是否大写
ans += (s[now] ^ ' '); //大写转小写
}
now++; //枚举下一个
}
cout <<'/'<<ans; //输出
}