Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
42843 汤书哲 利用指针编写strlen函数 C++ Accepted 2 MS 284 KB 230 2022-11-26 22:39:34

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int f(char a[]) { char *p; p=a; int sum=0; while(*p!='\0') { sum++; p++; } cout<<sum<<endl; return 0; } int main() { char x[1000000]; gets(x); f(x); }