Submission #88644

#TimeUsernameProblemLanguageResultExecution timeMemory
88644BadralEnergetic turtle (IZhO11_turtle)C++17
0 / 100
3 ms504 KiB
#include <bits/stdc++.h> 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)

turtle.cpp: In function 'int main()':
turtle.cpp:10:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < st.size(); i++) {
                    ~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...