500th Video Contest
Hey guys, this is mackhez101. I know last time I uploaded a video, I didn't have a beard. Um, so you're probably pretty surprised by that, but you really shouldn't be because what programmer doesn't have a beard? Um, and I know last time I uploaded a video, I wasn't in this room, but once again, you shouldn't be that surprised because usually people, maybe they stay at their family's houses for, um, you know, for the holidays.
But if you were surprised by those things, you better not be surprised by the fact that we're doing a giveaway for our 500th Mac Heads video on YouTube. Um, so this giveaway, it's actually more of a contest, and I'll explain the details for in a sec. But basically, what I want to do with this is I want to get have a chance to give back to you guys because I may have uploaded 500 videos that I recorded, but if it weren't for you, I wouldn't have done that in the first place.
I wouldn't have gotten to learn most of the stuff and had most of the experiences I had because of Mac Heads 101 and because of all of you guys, so I'm really thankful for that. And, uh, so now let me just show you, uh, the contest that I'm doing and you can maybe see if you can win. Um, so there's gonna be a link in the description to this website right here, this webpage, where you can submit the solution to the contest if you manage to hunt it down and find it or solve it or whatever.
The idea is this contest you can do with math on paper if you spend enough time, or you can solve it with a program if you're better at programming than just pure math. But the idea is you're looking for an 11-digit password, and the password is 11 numerical digits, and I'll call these digits A through K since A through K, there are 11 letters there, and the first one being A, the last one being K.
We basically give you 12 equations that the digits of this password have to satisfy in order for it to be the correct password. I have, of course, verified writing my own program that there's only one password that meets these criteria, and I know what it is, but your challenge is to figure out what it is just by having the criteria and by solving for it.
So let me go ahead, and I'm going to explain to you how to go about even interpreting these equations so you can start to solve it. So on the web page, I give all the equations, and let me just talk about this first one here as an example. So the first equation is J divided by B equals F. Now J is, I guess, uh, what is it? Is it the tenth? It's the tenth digit divided by the second digit is equal to the sixth digit.
And when I say divided by, I'm talking about integers between zero through nine. For those of you who are programmers, you know that in pretty much any programming language, when you divide, let's say, three by two, you're going to get not 1.5, you're going to get one because when you divide an integer by another integer, it takes the result and then rounds down.
So three divided by two is one. I use that in this example. Example here, eight divided by three is two. That's another good example. I guess nine divided by two, you know you can do eight divided by two to get four and then you round off the point 0.5, so nine divided by two would be four. So that's just a little example of the kind of equations these are.
So you can't solve this with the normal stuff you learned in your math class. And if the integer aspect of it wasn't a hint to you that you couldn't solve it with your math class stuff, which probably should have been a hint, is that these percent signs are here. Um, if you're not familiar, the percent sign is a modulus.
So here's an equation, for instance, B mod C equals E. That means that when you take the second digit of the number and divide it by the third digit of a number, you get the fifth digit of the number. Um, so for example, let's say five mod two, what would five mod two be? Well, five divided by two, it would be, uh, well, it's two remainder one, so five mod two is one.
So the modulus operator basically looks at the remainder, and when you have zero mod something, um, the remainder is zero because zero divided by anything is zero and the remainder zero as well. So, uh, that's the modulus operator and the division operator here, like I said, rounds down. So those are the only nitpicky kind of things you need to know about these equations that are different than the normal kind of math equations you might have done in school.
And this is the kind of distinction between regular math and this programming kind of contest that makes it more of a Mac Heads 101 challenge and not a Math Heads 101 challenge. Now subtraction is the same kind of deal as it is, as you would expect from math and same with multiplication. That's just straightforward and we're saying you can't divide by zero and you can't mod by zero because mod by zero you'd have to divide by zero in order to do that.
So straight off the bat, we can see B isn't going to be zero, I isn't going to be zero, E isn't going to be zero, let's see C isn't going to be zero, I already say D, well D isn't going to be zero. So you can see everything you're dividing or modding by can't be zero. So right off the bat, I just gave you a pretty big clue about which digits are going to be able to be zero.
Um, but now I'll just show you real quickly the rest of this site. So if you're having some trouble and you're getting close but, uh, for some reason the answer you are trying isn't correct, you can type it here, and I'll type one for example, 12 zeros, it'll say the first criteria that your guess or your attempt didn't meet.
So in this case, I typed in a bunch of zeros; it says that doesn't meet the requirement J slash B equals F because you can't divide by zero, and this is the zero thing. So if I change this to one, now it's complaining about the I, and let's see where's I? Is this I? No, one of these is I. Well, anyway, don't worry about that.
So the idea is that this is a website, it's a contest basically where you just solve this problem. We give you, you type it in, when you type in the correct thing, this thing will turn green, and you can click submit, type your YouTube username and your email, and then we'll, you know, probably email you the iTunes gift card serial number or whatever.
But basically, this is a programming challenge, and because of that, we have in a couple different languages, whichever one you're the most familiar with, you can have a look here at the source code to a program which basically keeps just checking your key and seeing if it's correct or not.
Um, so here's an example, here's a C program that checks if it's the correct key. So we're basically giving you a program in a bunch of different languages that can check if it's the right password, and we're telling you to give us the correct password, so that's essentially the challenge.
Um, so I wouldn't recommend brute forcing this because it would just take a long time unless you're a really good assembly programmer. Um, and even then it would still probably take a long time. I mean, your computer is like several gigahertz, and there's like a hundred billion possibilities, so it's probably not the best idea to try to brute force this.
But certainly try to write a program to solve it, and, um, if you're the first one to solve it, you'll get $25 to iTunes. Uh, one small thing is the $25 to iTunes is to the US store just because that's where we are. We're in the US, at least me and my friends who run Mac Heads.
So if you're in another country, you're gonna have to make sure that you can figure out a way to redeem the U.S. store gift card. But I think I've had people figure that out before, so it shouldn't be that difficult to do. And if you can solve this problem, you're probably good enough at computers or math, or just being a total badass to figure out how to get a US gift card to work in some other country.
But, uh, anyway, this was our contest. I hope you guys enjoy, hope you have fun even if you're not the person who wins. And if a couple of people answer it within a reasonable time of each other, even though the first person wins, I'm gonna mention all of you in my video, uh, when I make a video announcing the winner.
And in the video that I make next, um, the announcement video of who wins, I'm probably also gonna explain how to solve this, and I'll show you, I'll probably give an example like a programming tutorial on how to solve this. So you guys can look forward to that even if you don't think you have a chance of winning.
But I think pretty much anyone does if they just sit down and try to write a program or use paper to rule out certain values or something. You know, I've seen some pretty clever things for these kind of problems.
Um, so anyway, thanks for watching Mac Heads 101, subscribe, and goodbye.