Solving Project Euler with Rust


English (Auto-generated)

I feel like that's a reference, right? Something like that. Let's see why is this mad about this. So I found a reference to a U. 64. Okay this is actually giving us oh I see because it's a reference to whatever is the last thing here. Oh and we want the actual last thing and it won't let us d reference it because it's an option. So what I would have to do, we have to do to solve this and we can just unwrap this for one, we can unwrap it and then it's still gonna be mad because it's like yeah, hey I'm a reference. You know why can't you just recognize me for who I am? And that's when we can maybe we can de reference it. Yeah. So we d reference that we shouldn't be using unwrap this way. This is bad. But you know what Yeah, let's just unwrap it. What that'll do is that if this doesn't work, if this if this thing's air condition is found then it will just panic and die. But since we're doing this for project Euler, we're not trying to build some kind of maintainable system here. That's that's an acceptable risk. I don't know. It seems a lot more complicated than when it was I -1. So but that's okay. Cool. So that's six. Let's try with 10,001. And this is by the way this is why I went through all this trouble to you to use found crimes and this memorized function right here. It's because I knew we were gonna use a huge number and finding crimes can be very slow. So I wanted to have some kind of optimization in place. Okay, well it says 10,000 and first crime is 13. So I'm pretty, I mean I'm not a, I'm not a scientist but I'm pretty sure it's because we have six right there At six. We should be saying and there we go. It's taken a long time but we found this. So it thinks that the answer is 10 is 104,743. So let's see maybe that sounds right to me. I mean let's see, let's see. Let's register here and see what happens. The his v has a v securely generated password, which you were totally just able to see if you freeze your, if you pause the video right there, you can see what it suggested. So come hack me And we'll say 66346. Remember me. Remember me. Okay. And we'll hit number seven over here. He'll put in what we think the answer is. Check it and wow. Oh my gosh, everyone we are so smart and cool. So all right. That's it. We did the answer. We solved it. Um has a difficult radio rating of 5%. Okay. Doesn't sound very difficult but a lot of mathematicians are on this site like a lot of math people math nerds you might say of which we long to be but are not yet. So their standard of what's hard and math and my standard of what's hard and math are radically different. Anyway. Thank you a lot for your time. I hope this is educational for you Project. Euler is an absolutely fantastic learning resource. It's mostly mathematical stuff like that, which is kind of nice because you get to learn the problems in a very pure way without having to worry too much about the contingencies of a given system. So anyway, thanks a lot. Bye bye.
6 Views 0 Likes 0 Comments

Math challenges are no match for Rust!

Leave a comment (supports markdown format)