1.1.1. 이민욱 ¶
import java.util.Scanner; public class Main { public static void main(String[] args) { // write your code here long[] FIBO = new long[100]; int i; for(i=0;i<100;i++){ FIBO[i]=-1; } FIBO[0]=0; FIBO[1]=1; Scanner input = new Scanner(System.in); int N = input.nextInt(); for(i=2;i<=N;i++){ if(FIBO[i]==-1){ FIBO[i]=FIBO[i-2]+FIBO[i-1]; } } System.out.printf("%d",FIBO[N]); } }