提交时间:2024-01-05 21:48:30
运行 ID: 35781
#include<iostream> using namespace std; int main() { int n; cin>>n; char* my_string = new char[n+1]; char[n+1]='\0'; int S=0; cin>>my_string; for(int i=n-1;i>=0;i--){ cout<<my_string[i]; if('A'<=my_string[i]&&my_string[i]<='Z'){ S++; } } cout<<endl<<S; cout.flush(); return 0; }