Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117788 任斌 反转字符串 C++ Accepted 1 MS 280 KB 450 2025-04-20 12:15:52

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char *p=new char[101]; int l; memset(p,0,sizeof(char)*101); gets(p); l=strlen(p); for(int i=l-1;i>=0;i--){ cout<<p[i]; } delete []p; return 0; }