링크텍스트
설명
풀이 흐름 설명
시간복잡도: O(1), 공간복잡도: O(1)
회독
코드
import java.util.Scanner;
import java.io.FileInputStream;
class Solution
{
public static void main(String args[]) throws Exception
{
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
System.out.print((N*(N+1))/2);
}
}
