美文网首页
Stones on the Table

Stones on the Table

作者: bbmessi | 来源:发表于2018-12-07 22:36 被阅读0次
3.1.png 3.2.png
#include<iostream>
using namespace std;
int main()
{
    char a[50];  
    cin >> a;
    int j = strlen(a);
    int m = 0;
    for (int i = 0; i <j-1; i++)
    {
        if (a[i] != a[i + 1])
            m++;
    }
    cout <<(j-1-m);
}

相关文章

网友评论

      本文标题:Stones on the Table

      本文链接:https://www.haomeiwen.com/subject/ciffhqtx.html