Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
78807 刘济玮 字符串拼接 C++ Accepted 1 MS 272 KB 281 2024-06-29 10:55:01

Tests(10/10):


Code:

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