-
[java]백준 합 8393번알고리즘 문제풀이/백준(자바) 2023. 3. 17. 23:37
코드
import java.util.Scanner; public class BOJ_8393 { public static void main(String[] args) { Scanner in = new Scanner(System.in); short n = in.nextShort(); int s=0; for(int i=0; i<=n;i++ ){ s+=i; } System.out.println(s); in.close(); } } // n 10000이하 short
링크
https://www.acmicpc.net/problem/8393
'알고리즘 문제풀이 > 백준(자바)' 카테고리의 다른 글
[java]백준 ??! 10926번 (0) 2023.03.19 [java]백준 그대로 출력하기 11718번 (0) 2023.03.18 [java]백준 구구단 2739번 (0) 2023.03.17 [java]백준 A+B - 3 10950번 (0) 2023.03.17 [java]백준 시험 성적 9498번 (0) 2023.03.16