목록문제풀이 (155)
말랑한 하루
[SW Expert Academy] 1289 원재의 메모리 복구하기 [C++]
[ 핵심풀이 ] [ 핵심소스 ] [ C++ ] #include #include #pragma warning(disable:4996) using namespace std; #define endl "\n" int main() { int tc; cin >> tc; for (int t = 1; t > temp; if (temp[0] == '1') cnt++; for (int i = 0; i < temp.length()-1; i++) { if (temp[i] != temp[i + 1]) cnt++; } cout
문제풀이/SWexpert Academy
2021. 1. 20. 01:14
[SW Expert Academy] 1288 새로운 불면증 치료법 [C++]
[ 핵심풀이 ] [ 핵심소스 ] [ C++ ] #include #include #include #pragma warning(disable:4996) using namespace std; #define endl "\n" #define MAX 10 bool sheep[MAX]; int main() { int tc; cin >> tc; for (int t = 1; t > temp; while (true) { if (view == 10) break; string sleep = to_string(temp * cnt++); for (int i = 0; i < sleep.length(); i++) { if (!sheep[sleep[i] - '0']) { view++; sheep[sleep[i] - '0'] = tru..
문제풀이/SWexpert Academy
2021. 1. 20. 01:13