[프로그래머스]키패드 누르기(c++)
https://programmers.co.kr/learn/courses/30/lessons/67256 코딩테스트 연습 - 키패드 누르기 [1, 3, 4, 5, 8, 2, 1, 4, 5, 9, 5] "right" "LRLLLRLLRRL" [7, 0, 8, 2, 8, 3, 1, 5, 7, 6, 2] "left" "LRLLRRLLLRR" [1, 2, 3, 4, 5, 6, 7, 8, 9, 0] "right" "LLRLLRLLRL" programmers.co.kr 복잡한 알고리즘을 요구하는 문제는 아닙니다. 단, 처음에 문제를 주의 깊게 읽지 않으면 많은 시간을 낭비 할 수 있습니다. #include #include #include #include ; #include using namespace std; stru..
2022. 5. 16.
[프로그래머스]숫자 문자열과 영단어(c++)
https://programmers.co.kr/learn/courses/30/lessons/81301 코딩테스트 연습 - 숫자 문자열과 영단어 네오와 프로도가 숫자놀이를 하고 있습니다. 네오가 프로도에게 숫자를 건넬 때 일부 자릿수를 영단어로 바꾼 카드를 건네주면 프로도는 원래 숫자를 찾는 게임입니다. 다음은 숫자의 일부 자 programmers.co.kr #include #include #include #include using namespace std; unordered_map number_map = { {"zero",0 }, {"one", 1 }, {"two", 2 }, {"three", 3 }, {"four", 4 }, {"five", 5 }, {"six", 6 }, {"seven", 7 }, {..
2022. 5. 16.