문제
풀이
#include <iostream>
#include <string>
using namespace std;
void solve(void) {
string s; cin >> s;
int ans = 0;
for (int i=0; i<s.length(); i+=3) {
if (s[i] != 'P') ans++;
if (s[i+1] != 'E') ans++;
if (s[i+2] != 'R') ans++;
}
cout << ans;
}
int main(void) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
solve();
return 0;
}