| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 154544 | 万骏博 | 指针遍历字符串 | C++ | Wrong Answer | 1 MS | 268 KB | 229 | 2026-05-30 16:29:57 |
#include<bits/stdc++.h> using namespace std; char s[100],c=' '; int b=0; int main(){ cin>>s; int a=strlen(s); char*p=s; c=s[a]; for(int i=0;i<a-1;i++){ if(*(p-i)==c){ b++; } } cout<<b; return 0; }
------Input------
sjfioewfdsnfdksljffnefuifsd
------Answer-----
3
------Your output-----
25