Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113131 刘佳宇 字符串替换 C++ Compile Error 0 MS 0 KB 302 2025-03-15 12:01:51

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string s2,s1; cin>>s1>>s2; int len=s1.size(); for(int i=0;i<len;i++){ if(s1[i]>='a'&&s1[i]<='z'){ cout<<s2[s1[i]-'a']; } elae if(s1[i]>='A'&&s1[i]<='Z'){ cout<<char(s2[s1[i]-'A']-32); } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:1: error: 'elae' was not declared in this scope
 elae if(s1[i]>='A'&&s1[i]<='Z'){
 ^