Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154543 万骏博 指针遍历字符串 C++ Accepted 1 MS 272 KB 200 2026-05-30 16:26:12

Tests(2/2):


Code:

#include<bits/stdc++.h> using namespace std; char s[100]; int b; int main(){ cin>>s; int a=strlen(s); for(int i=0;i<a;i++){ if(s[i]==s[a-1]){ b++; } } cout<<b; return 0; }