// Kuber
package Bronze_IV_4;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Ex20833 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int result = 0;
int n = Integer.parseInt(br.readLine());
for (int i = 1; i <= n; i++) {
result += (int) Math.pow(i, 3);
}
System.out.println(result);
}
}
'백준 풀이 > 자바(Java)' 카테고리의 다른 글
백준 31280 자바 - ФАКИР (0) | 2024.05.28 |
---|---|
백준 26768 자바 - H4x0r (0) | 2024.05.27 |
백준 7662 자바 - 이중 우선순위 큐 (0) | 2024.05.24 |
백준 1927 자바 - 최소 힙 (0) | 2024.05.23 |
백준 9461 자바 - 파도반 수열 (0) | 2024.05.23 |