배운지 너무 오래돼서 햇갈렸던 개념
약수
중에서 가장 큰
정수소인수분해
를 이용하여, 두 수를 지수가 있는 꼴로 변경공통인 소수 중에서 지수가 더 작은걸
사용배수
중에서 가장 작은
정수 # 재귀 o
public static int gcd(int a, int b){
// 유클리드 호제법
if (b==0){
return a;
}
return gcd(b,a%b);
}
# 재귀 x
public static int lcm(int a, int b){
int multiply = a*b;
while(b!=0){
int r = a%b;
a = b;
b = r;
}
return multiply/a;
}
Because some characters have special meanings.
For instance, in a query string, the ampersand (&
) is used as a separator between key-value pairs.
If you were to put an ampersand into one of those values,
it would look like the separator between the end of a value and the beginning of the next key.
So for special characters like this, we use percent encoding
so that we can be sure that the data is unambiguously encoded.
Why do you need to encode URLs?
추상 클래스란? 추상 메소드와 바디가 있는 메소드로 구성 되어있는 만들다만 객체
인터페이스: 추상 메소드로만 이루어져, 틀만 있는 형태
자바는 단일 상속만 지원하기 때문에, 상속을 사용하게 되면 제약이 생기게 된다.
리스코프 치환의 원칙