FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ProjectEuler-Java/Sol48.java at master · JoshP/ProjectEuler-Java · GitHub
JoshP
ProjectEuler-Java
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
ProjectEuler-Java
/
Sol48.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
12 lines (10 loc) · 357 Bytes
Breadcrumbs
ProjectEuler-Java
/
Sol48.java
Copy path
File metadata and controls
12 lines (10 loc) · 357 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
import
java
.
math
.*;
public
class
Sol48
extends
BaseSolution
{
public
void
runSolution
() {
BigInteger
sum
=
BigInteger
.
ZERO
;
for
(
int
i
=
1
;
i
<=
1000
;
i
++) {
sum
=
sum
.
add
(
BigInteger
.
valueOf
(
i
).
pow
(
i
));
}
System
.
out
.
println
(
"last 10 = "
+
sum
.
toString
().
substring
(
sum
.
toString
().
length
() -
10
));
}
}
Back
|
FazBrowse Home
|
New Git URL