Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88747 | 倪士燊 | 字符串拼接 | C++ | Accepted | 1 MS | 272 KB | 256 | 2024-08-21 10:30:48 |
#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; }