문자열3 <C++> 정수형을 문자열로 1. to_string en.cppreference.com/w/cpp/string/basic_string/to_string std::to_string - cppreference.com (1) (since C++11) (2) (since C++11) (3) (since C++11) (4) (since C++11) (5) (since C++11) (6) (since C++11) (7) (since C++11) (8) (since C++11) (9) (since C++11) Converts a numeric value to std::string. 1) Converts a signed integer to a string with the sam en.cppreference.com std::string to_str.. 2020. 10. 19. <C++> 문자열을 정수형으로 en.cppreference.com/w/cpp/string/basic_string/stol std::stoi, std::stol, std::stoll - cppreference.com (1) (since C++11) (2) (since C++11) (3) (since C++11) Interprets a signed integer value in the string str. Discards any whitespace characters (as identified by calling isspace()) until the first non-whitespace character is found, then takes as many charact en.cppreference.com C++에서 문자열을 정수형으로 변.. 2020. 10. 18. baekjoon #1120 문제 https://www.acmicpc.net/problem/1120 1120번: 문자열 길이가 N으로 같은 문자열 X와 Y가 있을 때, 두 문자열 X와 Y의 차이는 X[i] ≠ Y[i]인 i의 개수이다. 예를 들어, X=”jimin”, Y=”minji”이면, 둘의 차이는 4이다. 두 문자열 A와 B가 주어진다. 이때, A의 � www.acmicpc.net 이 문제는 입력받은 두 문자열의 차이의 최솟값을 구하는 문제이다. 이 문제의 핵심은 두 문자열의 길이가 다를 수 있다는 것인데 밑에서 어떻게 해결하였는지 설명하겠다. 해결 만약 문자열의 길이가 같다면 한 번만 비교하면 되겠지만 만약 문자열의 길이가 다르다면? 예를들어 설명해보겠다. 문자열 A : "abcdefghi" 문자열 B : "bccef" 1... 2020. 6. 17. 이전 1 다음