Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154616 万骏博 利用指针编写strlen函数 C++ Accepted 1 MS 280 KB 222 2026-05-30 17:25:57

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; string s; int strlen(int* p){ int l=0; for(;*p!='\0';){ l++; p++; } return l; } int main(){ getline(cin,s); int b=strlen(&s[0]); cout<<b; return 0; }