1 条题解

  • 0
    @ 2025-4-7 21:29:27

    C++ :

    #include<iostream>
    using namespace std;
    char from[100],to[100];
    void solve(char *p,int n,char *q)
    {
    	p+=n-1;
    	while (*q++=*p++) ;
    }
    int main()
    {
    	int n,m;
    	cin>>n;
    	for (int i=0; i<n; i++) cin>>from[i];
    	cin>>m;
    	solve(from,m,to);
    	cout<<to<<endl;
    	return 0;
    }
    
    • 1

    C语言程序设计教程(第三版)课后习题10.7

    信息

    ID
    1580
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    (无)
    递交数
    0
    已通过
    0
    上传者