Files
python/TangDou/AcWing/Statemachine/1052_Prepare.cpp
HuangHai 1f397eca87 'commit'
2025-08-30 18:35:01 +08:00

11 lines
450 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include <bits/stdc++.h>
using namespace std;
const int N = 110;
char a[N];
int main() {
scanf("%s", a + 1); //输入abcdef,共6个字符,放过下标为0的位置,从下标为1开始
int len = strlen(a + 1); //含义:从a下标偏移为1开始,计算到末尾\0的长度
printf("%d", len); //输出答案:6,理解:让从1开始,到末尾,尾巴在哪里自己找,计算返回长度
return 0;
}