Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88746 | 王馨桐 | 字符串拼接 | C++ | Accepted | 1 MS | 280 KB | 237 | 2024-08-21 10:30:36 |
#include<bits/stdc++.h> using namespace std; char s1[100]; char s2[100]; int n; int main(){ cin >>s1; cin >>s2; cin >>n; int la=strlen(s1); if(n<=la){ cout <<s1[n-1]; }else{ cout <<s2[n-la-1]; } return 0; }