Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78814 邓嘉瑶 字符串拼接 C++ Accepted 1 MS 272 KB 241 2024-06-29 10:58:21

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { char a[1000],b[1000]; scanf("%s",a); scanf("%s",b); int x; cin>>x; int len=strlen(a); if(x<=len) { cout<<a[x-1]; }else { cout<<b[x-len-1]; } return 0; }