Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

새싹교실/2017/따라와반/과제방: Difference between revisions

From ZeroWiki
No edit summary
No edit summary
Line 48: Line 48:
  }
  }
  }
  }
= 자료구조 =
== 1회차 ==
* [https://www.acmicpc.net/problem/2444 별찍기 - 7]
* [https://www.acmicpc.net/problem/2740 행렬 곱셈]
* [https://www.acmicpc.net/problem/2436 공약수]
* [https://www.acmicpc.net/problem/2607 비슷한 단어]
=== 신원준 ===
==== 별찍기 - 7 ====
(여기에 코드를)
==== 행렬 곱셈 ====
(여기에 코드를)
==== 공약수 ====
(여기에 코드를)
==== 비슷한 단어 ====
(여기에 코드를)
=== 이민욱 ===
==== 별찍기 - 7 ====
(여기에 코드를)
==== 행렬 곱셈 ====
(여기에 코드를)
==== 공약수 ====
(여기에 코드를)
==== 비슷한 단어 ====
(여기에 코드를)
=== 정석우 ===
==== 별찍기 - 7 ====
(여기에 코드를)
==== 행렬 곱셈 ====
(여기에 코드를)
==== 공약수 ====
(여기에 코드를)
==== 비슷한 단어 ====
(여기에 코드를)



Revision as of 01:52, 24 March 2017

자바

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]);
    }
}

정석우

import java.util.Scanner;

public class Hello 
{
	public static void main(String[] args)
	{
		long arr[] = new long [100];
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		arr[0] = 0;
		arr[1] = 1;
		for(int i=2; i<=n; i++)
		{
			arr[i] = arr[i-2] + arr[i-1];
		}
		System.out.println(arr[n]);
	}
}

자료구조

1회차

신원준

별찍기 - 7

(여기에 코드를)

행렬 곱셈

(여기에 코드를)

공약수

(여기에 코드를)

비슷한 단어

(여기에 코드를)

이민욱

별찍기 - 7

(여기에 코드를)

행렬 곱셈

(여기에 코드를)

공약수

(여기에 코드를)

비슷한 단어

(여기에 코드를)

정석우

별찍기 - 7

(여기에 코드를)

행렬 곱셈

(여기에 코드를)

공약수

(여기에 코드를)

비슷한 단어

(여기에 코드를)