Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
136437 李明秦 字符串替换 C++ Compile Error 0 MS 0 KB 451 2025-11-14 15:42:16

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ string S,s; cin>>S>>s; for(int i=0;i<S.length;i++){ if('A'<=S[i]&&s[i]<='Z')S[i]=s[S[-'A']]; }else if('a'<=S[i]&&s[i]<='z')S[i]=s[S[-'a']]; cout<<S; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:21: error: invalid use of member function (did you forget the '()' ?)
     for(int i=0;i