# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
88645 | Badral | Energetic turtle (IZhO11_turtle) | C++17 | 13 ms | 380 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int k = 0;
int n;
int main() {
string st;
cin >>st;
for(int i = 0; i < (int)st.size(); i++) {
if(st[i] == 'T'){
k++;
}
}
cin >>n;
cout<<min(st.size()-k+n,st.size()-n+k);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |