[프로그래머스][Js] Lv.0 - 분수의 덧셈
문제💭 나의 풀이👨💻 function solution(denum1, num1, denum2, num2) { let result = [0,0] let x = denum1*num2 + denum2*num1; let y = num1*num2 let lcm = 1; for(let i = 0; i { let [ denum, num ] = [denum1 * num2 + denum2 * num1, num2 * num1] while(true) { let isContinue = false const min = denum (a*b)/g(a,b),p,q,solution=(a,b,c,d)=>{return ..
2023. 3. 15.
[Linux] 파일 권한 확인 및 변경하기 (permission)
퍼미션(permission)이란? 특정 파일이나 경로를 사용할 권한을 설정하는 기준이자 그 기준으로 만든 설정 그 자체를 일컫는 말이다. 유닉스/리눅스에서 주로 사용되는 파티션에서는 3자리의 8진수로 이루어진 권한 설정이 사용되며, 첫째 자리는 해당 파일의 소유자 본인, 둘째 자리는 파일 소유자가 소속된 그룹과 같은 그룹에 소속된 사용자, 셋째 자리는 그 외의 일반 사용자로써 각각 읽기(파일 구성을 읽을 수 있다), 쓰기(파일 구성을 수정할 수 있다), 동작(파일을 실행시킬 수 있다)의 권한을 4, 2, 1의 숫자 조합을 통해 나타낸다. 4, 2, 1의 조합인 이유는 2진수로 표현 시 첫 자리(4)가 읽기, 둘째 자리(2)가 쓰기, 셋째 자리(1)가 동작이라서이다. 출처 : 나무위키 퍼미션을 확인하는 방..
2023. 3. 13.