Problem Solving/?
-
[leetcode] 283. Move zeroes - CProblem Solving/? 2022. 3. 12. 00:00
문제 https://leetcode.com/problems/move-zeroes/ Move Zeroes - 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 분류 - ? 난이도 - Easy 제약조건 1
-
[leetcode] 136. Single Number - CProblem Solving/? 2022. 3. 11. 23:51
문제 https://leetcode.com/problems/single-number/ Single Number - 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 분류 - ? 난이도 - Easy 제약 1
-
[백준-python] 1085번: 분해합Problem Solving/? 2022. 2. 14. 01:24
분류 - ? 난이도 - 브론즈3 완전탐색으로 풀 뻔 했다가 좀 더 간단하게 풀 수 없을지 고민하다 푼 문제. 현재 좌표에서 직사각형의 경계선까지의 거리는 결국 x좌표와 x=0 사이의 거리 x좌표와 x=w 사이의 거리 y좌표와 y=0 사이의 거리 y좌표와 y=h 사이의 거리 고, 이 중 최솟값을 구하면 된다. 답안 코드 메모리: 30864 KB , 시간: 72 ms, 코드 길이: 99B (주석 포함) x,y,w,h=map(int, input().split()) # left, right, up, down print(min(x-0, abs(x-w), y-0, abs(y-h)))