link: http://codeforces.com/contest/332/problem/A

 /*
ID: zypz4571
LANG: C++
TASK: 193a.cpp
*/ #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include <algorithm>
#include <queue>
#include <deque>
#include <queue>
#include <list>
#include <map>
#include <set>
#include <vector>
#include <utility>
#include <functional>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <numeric>
#include <cassert>
#include <ctime>
#include <iterator>
const int INF = 0x3f3f3f3f;
const int dir[][] = {{-,},{,},{,-},{,},{-,-},{-,},{,-},{,}};
using namespace std;
char a[];
int main ( int argc, char *argv[] )
{
#ifndef ONLINE_JUDGE
freopen("in.txt", "r", stdin);
#endif
ios::sync_with_stdio(false);
int n; cin>>n;
cin>>a+;
int len = strlen(a+);
long long ans();
for (int i = ; i+n<=len; i+=n) {
if(a[i+n-]==a[i+n-]&&a[i+n-]==a[i+n-]) ans++;
}
cout<<ans<<endl;
return EXIT_SUCCESS;
} /* ---------- end of function main ---------- */

However, I can not understand the problem's meanning at first although it is so easy in fact.

It is time to train myself reading some problem and grasp it as quickly as possible.