https://www.acmicpc.net/problem/8393
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(br.readLine());
br.close();
int s =0;
for(int i=0; i<N; i++) {
s += i+1;
}
System.out.println(s);
}
}코드를 입력하세요