백준 1769번 c++ 풀이 - 3의 배수 (int to string)
·
Algorithm/C++
- int to string : to_string() 사용. include 필수 - string to int: int로 변환한 뒤 - 48 #include #include using namespace std; int main() { string str; cin >> str; int count = 0; while (int(str.size()) != 1) { int sum = 0; for (unsigned i = 0; i