AlgorithmOJ
Problem
Local Problems
All Problems
Problem Category
Status
Contest
Standard Contests
Replay Contests
Virtual Contests
Ranklist
More...
News
About
F.A.Q
Recent Contests
Coming Soon...
Login
Register
2026-11-23 17:15:58
Calculate S(n)
Time Limit:
1000ms
Memory Limit:
32768KB
This problem will be judged on
HDU
. Original ID:
2114
64-bit integer IO format:
%I64d
Java class name:
Main
Prev
Submit
Status
Statistics
Next
Font Size:
Description
Calculate S(n).
S(n)=1
3
+2
3
+3
3
+......+n
3
.
Input
Each line will contain one integer N(1 < n < 1000000000). Process to end of file.
Output
For each case, output the last four dights of S(N) in one line.
Sample Input
1 2
Sample Output
0001 0009
Source
HDU 2007-10 Programming Contest_WarmUp
Language:
C++
C++11
C++14
C
Java
Pascal
Python2
Python3
C#
Fortran
Perl
Ruby
Ada
SML
Visual C++
Visual C
CLang
CLang++
Theme:
Monokai
Solarized Light
Material
Share Code?
Yes
No
×
Login
Username:
Password:
Cookie:
Never
One Day
One Week
One Month
One Year
×
Register
Username:
Password:
Repeat Password:
Nickname:
School:
Email:
×
News Title
by