본문 바로가기

개발/Coding Test74

[SW Expert Academy D1] 평균값 구하기 안녕하십니까. Eun🦆입니다. 풀이법 입니다. SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include using namespace std; int main(int argc, char** argv) { int test_case; int T; int n, sum; cin>>T; for(test_case = 1; test_case 2022. 6. 9.
[SW Expert Academy D1] 홀수만 더하기 안녕하십니까. Eun🦆입니다. 풀이법 입니다. SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include using namespace std; int main(int argc, char** argv) { int test_case; int T; int n, sum; cin>>T; for(test_case = 1; test_case 2022. 6. 9.
[SW Expert Academy D1] 중간값 찾기 안녕하십니까. Eun🦆입니다. 풀이법 입니다. SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com #include #include using namespace std; int main(int argc, char** argv) { int test_case; int T; int n; cin>>T; int arr[200]; for(test_case = 1; test_case 2022. 6. 9.
[LeetCode 7] Reverse Integer 안녕하십니까. Eun🦆입니다. 풀이법 입니다. Reverse Integer - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { public: int reverse(int x) { // MAX, MIN if(x>2147483647 || x0) sign = 1; else { sign = -1; x = x*sign; } while(1) { if(x>0) { if(x%10>0) answer += x%10; if(answer>0 & x/10>.. 2022. 6. 7.
[LeetCode 1] Two Sum 안녕하십니까. Eun🦆입니다. 풀이법 입니다. Two Sum - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com class Solution { public: vector twoSum(vector& nums, int target) { vector answer; for(int i=0;i 2022. 6. 7.
[프로그래머스 Lv3 C++] 야근 지수 안녕하십니까. Eun🦆입니다. 풀이법 입니다. 코딩테스트 연습 - 야근 지수 회사원 Demi는 가끔은 야근을 하는데요, 야근을 하면 야근 피로도가 쌓입니다. 야근 피로도는 야근을 시작한 시점에서 남은 일의 작업량을 제곱하여 더한 값입니다. Demi는 N시간 동안 야근 피로도 programmers.co.kr [효율성 미통과 코드] #include #include #include #include using namespace std; long long solution(int n, vector works) { long long answer = 0; for(int idx=0;idx 역시 n번 정렬은 안되나 싶다. ​ #include #include #include #include using namespace st.. 2022. 6. 7.