백준 2193번

· Algorithm
- 알고리즘 분류 : dp - 사용 언어 : JAVA 소스 설명은 주석을 참고해주세요. import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); // long으로 선언한 이유 : int의 범위를 벗어나기 때문 long[] d = new long[91]; d[1] = 1; d[2] = 1; // 점화식 : d[i] = d[i-1] + d[i-2]; for(int i=3; i
멍목
'백준 2193번' 태그의 글 목록