카테고리 없음
2024. 3. 10.
백준 - 26005번
풀이 import java.io.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int num = Integer.parseInt(br.readLine()); int result = 0; if(num >= 2) { result = num * num / 2; if(num % 2 == 1) result++; } System.out.println(result); } }