Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
132458 石水生 字符串拼接 C++ Compile Error 0 MS 0 KB 193 2025-10-08 14:28:01

Tests(0/0):


Code:

#include <bits/stdc++.h> using namespace std; char a[300],b[151]; int main(){ cin>>a>>b>>n; for(int i=strlen(a);i<strlen(a)+strlen(b);i++){ a[i]=b[i-strlen(a)]; } cout<<a[n-1]; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:13: error: 'n' was not declared in this scope
  cin>>a>>b>>n;
             ^
Main.cc:6:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=strlen(a);i