Ok, that one was hard: find the largest prime factor of a 12 digit number. Problems I ran into -- inefficient algorithms, and trouble entering in the number, since 12 digits is bigger than the largest int primitive in Java, and I needed to enter it as a long. However, I couldn't just enter it directly, because the Java compiler tried to read the number as an int, so I had to bring it in as a string, then use the Long.parseLong(string x) method in the Long class to get it into the variable before I could even get started on the algorithm.
This is as much to get me refamiliarized with Java as it is solving the problems. Long way to go . . . .
-
I've been re-watching The Bear and am now totally thinking of my job as a
chef. I started out that way 40+ years ago, and somewhere along the line I
stoppe...
Craters
-
[image: It's annoying that the Nastapoka Arc isn't a meteor impact crater,
but I truly believe that--with enough time, effort, and determination--we
could ...
I Fight For The Users
-
If you haven't been able to keep up with my blistering pace of one blog
post per year (if that), I can't blame you. There's a lot going on right
now. It'...
Progress on the Block Protocol
-
Since the 1990s, the web has been a publishing place for human-readable
documents. Documents published on the web are in HTML. HTML has a little
bit of… Re...
California King: "What is HØL?"
-
Our work was done. We'd said all we needed to say. We apparated from this
world, much like monks who retreat to a mountaintop hovel. Only for us, we
appara...
Instapaper 4: Deciding to Read
-
[image: Instapaper 4 Icon]
*Introducing Instapaper 4.0 for iPad and iPhone*
The lede here is that my pal, Marco, has just released the stellar new 4.0
v...
Apple Blossoms
-
I'm a potter, a farmer, and a foodie. They all go together so beautifully.
Come see why at our upcoming pottery show...
Hinckley Pottery’s 19th Annual Stud...
Leeks
-
Onwards with my discourse on leeks. Along with onions and garlic, leeks are
in the Alliaceae family. While certainly not very popular in Texas, leeks
are...
4/23/2010
ReplyDeleteFinished the first Project Euler problem.
4/23/2010
ReplyDeleteFinished the second Project Euler problem. However, they're getting much harder.
4/24/2010 Problem #3
ReplyDeleteOk, that one was hard: find the largest prime factor of a 12 digit number. Problems I ran into -- inefficient algorithms, and trouble entering in the number, since 12 digits is bigger than the largest int primitive in Java, and I needed to enter it as a long. However, I couldn't just enter it directly, because the Java compiler tried to read the number as an int, so I had to bring it in as a string, then use the Long.parseLong(string x) method in the Long class to get it into the variable before I could even get started on the algorithm.
This is as much to get me refamiliarized with Java as it is solving the problems. Long way to go . . . .