본문 바로가기

Algorithm/Baekjoon

[백준_JAVA_알고리즘] 24263 알고리즘 수업 - 알고리즘의 수행 시간 2

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        
        System.out.println(n);
        System.out.println(1);
        
        scanner.close();
    }
}

 

시간 복잡도 O(n)이다.

n은 7번 수행

수행 시간은 1이다