-
백준 8393번 합Programming/BaekJoon 2021. 7. 15. 06:42
package for_; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class 합 { 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 result = 0; for(int i = 1; i <= n; i++) { result+=i; } System.out.println(result); } }
'Programming > BaekJoon' 카테고리의 다른 글
백준 2741번 N 찍기 (0) 2021.07.15 백준 15552번 빠른 A + B (0) 2021.07.15 백준 10950번 A + B - 3 (0) 2021.07.15 백준 2739번 구구단 (0) 2021.07.14 백준 2884번 알람시계 (0) 2021.07.14