 What's up guys Mike the Coder here today? We're gonna do trying try count counting triangles This is this I'm not actually gonna go over this problem So this problem is just like just use the formula There's really not much else to it. So basically you're given the the Number of test cases and then each line is n which is the level of triangle in that test case and you want to find Basically you want to find the number of triangles For all of them right so like here we have level one which is one triangle level two is like here We have one two three four right two so then it's gonna spit out four triangles right two is gonna spit out four triangles Actually, there's five five triangles right one two three four and then the Total big triangle five and then level three is like this is level four one two three four And then you have to find how many triangles is for that So to solve this problem, you're just gonna have to count and then try to find the pattern I'm not gonna actually do that because that takes a while and a lot of time But I will put a link in the video down below About a guy who goes over this problem and he goes over how to actually find the number of triangles For each of these levels. So yeah, I'll post that video down below In the meantime, I'll just show you guys the code on What the formula does so here? This is how what I did I read in integer t and a while t minus minus and I read in the integer n and what I'm gonna do is I'm gonna do n times n plus 2 times 2n Plus 1 divided by 8 so this is the formula for finding the number of triangles at the nth level So yeah, you're just gonna have to Derive this formula. I'll pull I'll post the link to the video down below about how he how to come up with this formula But there's a guy who actually went over in depth So yeah, yeah, so yeah, yeah, I don't really have that much time today to go over video So yeah, but yeah, I hope you guys enjoy this video break up subscribe I've been going through a lot of work currently finals exams are coming up. So yeah, I need to figure that out But yeah Today there was a recent code forces contest Maybe I'll go over that go over probably in B. I was able to solve a I was so close to solving B But I didn't and I see see I definitely could have solved but I didn't skip for that Yeah, yeah, anyway, Rick comps scribe. I'll put the link down below for how to derive this formula and yeah peace