Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62524 刘济玮 字符串拼接 C++ Compile Error 0 MS 0 KB 310 2023-12-24 11:29:54

Tests(0/0):


Code:

#include<iostream> #include<cstdio> using namespace std; int main() { char a[1001]; char b[1001]; cin>>a>>b; int n; cin>>n; int la = strlen(a); int lb = strlen(b); if(la>=n){ cout<<a[n-1]; } else{ cout<<b[n-la-1]; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:22: error: 'strlen' was not declared in this scope
     int la = strlen(a);
                      ^
Main.cc:12:9: warning: unused variable 'lb' [-Wunused-variable]
     int lb = strlen(b);
         ^