답안 #88643

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
88643 2018-12-07T08:29:26 Z Badral 힘 센 거북 (IZhO11_turtle) C++17
0 / 100
17 ms 376 KB
#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

turtle.cpp: In function 'int main()':
turtle.cpp:13:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0; i < st.size(); i++) {
                    ~~^~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 252 KB Output isn't correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Incorrect 2 ms 256 KB Output isn't correct
5 Incorrect 2 ms 256 KB Output isn't correct
6 Incorrect 2 ms 376 KB Output isn't correct
7 Incorrect 2 ms 256 KB Output isn't correct
8 Incorrect 2 ms 256 KB Output isn't correct
9 Incorrect 2 ms 256 KB Output isn't correct
10 Incorrect 2 ms 256 KB Output isn't correct
11 Incorrect 2 ms 256 KB Output isn't correct
12 Incorrect 3 ms 256 KB Output isn't correct
13 Incorrect 2 ms 376 KB Output isn't correct
14 Incorrect 3 ms 376 KB Output isn't correct
15 Incorrect 2 ms 376 KB Output isn't correct
16 Incorrect 6 ms 376 KB Output isn't correct
17 Incorrect 17 ms 376 KB Output isn't correct
18 Incorrect 2 ms 376 KB Output isn't correct
19 Incorrect 0 ms 256 KB Output isn't correct
20 Incorrect 2 ms 256 KB Output isn't correct