# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
88643 | Badral | Energetic turtle (IZhO11_turtle) | C++17 | 17 ms | 376 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 <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int k = 0;
int n;
int main() {
string st;
cin >>st;
for(int i = 0; i < st.size(); i++) {
if(st[i] == 'T'){
k++;
}
}
cin >>n;
cout<<min(st.size()-k+n,st.size()-n+k);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |