 What's up guys? My name is Michael and welcome to my YouTube channel today. We are going to go over the first 200 Algorithm classical algorithm problems on spodge I read on core that if you were to solve the first 200 problems You have the basic sense of algorithms and data structures So then it's actually a good idea to just solve the first 200 problems first And then we could keep going back to code forces and solve those problems But yeah, that's why I've read that we had to solve the first 200 most solved algorithm problems first So yeah, this is gonna be the first problem. It's a test life universe and everything Your problem is basically just to use a brute force approach to find the answer to life So what does that mean? That means that we are going to keep reading in numbers until we reach 42 we reach 42 we stop Okay, so basically to do this problem. It's actually not that difficult. You just have to keep reading it in the numbers until you reach 42 So yeah, this is my code for it. First of all, we have a number t which is the Current input value that we're reading in Yeah, and then we read in t and then that's just reading in t so that the t changes So then that's from the console that to read and they say to keep reading it in until we get to 42 Right and print it out till we get to 42 So what I did was while t is not equal to 42 I'm just gonna print out t and I'm gonna read in it again Okay, so then by the end of this loop if it equals to 42, it's gonna break out this while loop and then it doesn't print anything So yeah, and this actually works Yeah, this actually works fine if you just submit it, but this that's basically how you do this first problem It this is sorry guys if this is not really like a huge huge Large tutorial, but it's pretty straightforward. You're just translating it into code the first problem. But yeah Um, well what I also have here is a hashtag define LL long long. This is just Re-representing every time I have LL. I'm saying it's a long long But I'm pretty sure the test cases don't actually matter that much, right? You could use like You don't have to use long long in the test cases. You could use int in a drawer I'm pretty sure. Yeah, and then I'm also including a bunch of these libraries in order to make sure it works fine This mod doesn't really matter. This is from another problem. We'll take that out This is just a namespace using namespace is the and then this is my main method. Yeah This is just improved speed for input and output But yeah, and yeah at the end you just return zero and this code works because if you look it up If you run it if you do one it prints out one two prints out two three three If I do like a hundred it prints out a hundred until I get to 42 then it stops All right, it doesn't print anything out. So yeah, um, we could actually submit it and see what it got I already know it works because I already submitted it, but yeah We just keep keep Just submitted it and then later on we'll do the and it's he it got accepted. So yeah Tomorrow we'll go over the next problem on spodge of classical problems. They get increasingly more difficult Um the last time I did this they got way more increasingly difficult, but yeah Yeah, we'll go over the next problem in the next video and then yeah, we'll see how this goes Let's see how this series goes of classical spodge 200 to classical problems But yeah, I hope you guys enjoyed this tutorial very calm subscribe. I'll check you guys later. Peace