Cracking Crypto To Get Into College
Kallahar writes "New Scientist is running a story about a Canadian university who had students break an encrypted message in order to get into college. A good idea to grab a good student, but here in 'Free' America these kids would have been thrown in jail for violating the DMCA ..."
shut up timothy - the DMCA doesn't apply when the copyright holder asks you to break the encryption.
You mean like when Professor Felten was threatened because he met the challenge to break SDMI? Oh wait...
I pledge allegiance to the flag...
of the Corporate States of America...
shut up timothy - the DMCA doesn't apply when the copyright holder asks you to break the encryption.
It is worth pointing out that Timothy isn't the one who made that comment. It was the submitter, Kallahar...
What do you know I wrote a novel
Of course, since it was just an encoded mathematical problem, I doubt they even bothered to copyright it. And it was the poster, not the editor, who made the stupid comment. I still would argue that the flambait line should of have been removed, but hey. Too bad you can't mod stories.
The idea sounds interesting, but kinda gimmicky. Especially with a scholarship for speed--with a problem it took 30 minute for _New_Scientist_ to solve (or did I misread something) that seems a bit silly. Now, waiving the application fee for anyone who solves it, that seems a more commensurate prize.
Just because you broke some method of encryption doesn't necessarily make you a good computer science student. What about good design or object oriented techniques? How about math skills and knowledge of discrete mathmatics and its relation to programing language design?
Since I know scripting languages, am I an elite hacker?
Since I can install linux, am I a sys admin?
Since I can make brownies am I Wolfgang Puck?
IMHO breaking the encryption doesn't mean too much.
- gtaluvit (prnc. GOT-tuh-LUV-it)
See, these people write in with links to articles, and they write a summary of the article and usually throw in their opinion. Those parts are italicized. Then an editor approves the story and sometimes they make comments themselves.
And sometimes they don't make comments. Like this time.
So, I think you owe timothy an apology.
"And like that
I wish that more universities in the US did this. It would help distinguish those that are intelligent from those that leaned over the shoulders of the intelligent.
.sdrawkcab si gis siht
You mean like when Professor Felten was threatened because he met the challenge to break SDMI?
Proffesor Felten was threatened when he attempted to publish his results - The specific charge, as I recall, was distribution of a circumvention device. This is different, one notable difference being that most universities won't try to sue you for entering their contest.
Reboot macht Frei.
The cryotography turns out to have been very trivial. Here are the details.
He wasn't threatened when he broke it or because he broke it. He was threatened because he was going to do the un-American (un-Corporate?) thing and turn down the money instead to publish a paper on the subject [which he subsequently did present].
Disclosure of procedure is different than just doing something.
- Sometimes you're the pidgeon, sometimes you're the statue.
From slashdot:
But from the article:
And from slashdot:
Uh, yeah. Whatever.
Here's a link to the puzzle from the college's website:
http://www.whatmagnet.com/gofigure/index.html
This reminds me of the Try2Hack website.. It consists of 10 or so challenges, each one harder than the previous, involving html/javascript, java, vb, packet sniffing, etc.
It would be great to see something like this as a final exam for anyone studying networks or security.
(And yes, the RIAA backed off...but the threat was credible enough that it left the lingering possibility that someone could be prosecuted under the DMCA for breaking encryption when invited to do so, if the inviter disapproves of what they do with the information afterwards.)
When all you have is a hammer, everything looks like a skull.
The New Scientist article was really short on details. Anyway though, I found the university's press release, which has much more details. It can be found here. This link also contains the actual puzzle in case anyone is so inclined to try to break it...
Do you mean "free as in beer" or "free as in speech?"
The point of college is to learn the things you have mentioned. Does filling out a college application or writing an entrance essay make you a good CS student? No. It just demonstrates your ability to perform a task involving some thought. Does breaking an encrypted message make you a good CS? No, of course not. But, it DOES show that you have strong skills in mathematics and analytical logic. Don't be so silly in jumping to conclusions.
Why bother.
All the code is is the index of the letters of the alphabet in base 4. There's a URL underlined in there that makes it really obvious what the "encryption" technique being used is.
SPOILER ALERT
Heh, they can call it encryption if they want, but this is encryption on the same scale as ROT-13. The message is encoded in the Base-4 number system with each number being the alphabet's letter's numerical position. so a = 1, z = 26. Or encoded, a = 001, z = 122.
And like numerous people have pointed out, while this contest in itself can't lead to a DMCA violation, the sad thing is, a piece of software "encrypted" with this algorithm could.
This is a marvelous idea! Now that I've thought of it, I believe that every college should do something unique each year as part of its acceptance process. In other words, technical colleges might have you break an encryption, or fix some obscure bug nobody can find in a huge piece of software, or something difficult and obscure that most people wouldn't be able to accomplish. If you can do that, it adds major points to your acceptance process and gives you a huge advantage. Of course, other important stuff (like what grade you got in kindergarden) would still apply.
-_-_-O-_-_-H-_-_- -_-_-W-_-_-E-_-_-L-_-_-L-_-_- !
You know, this makes sense, up to a point. Most Liberal Arts kids have to write Essays to get into college, why not have Computer Science Geeky Kids Crack Codes?
Well, I think the major problem is the *lack* of creativity. This doesn't quite show that you have creative thought, only that you can deduce something logically. Now, as I understand it, that applies to programming, but really, if you're going to be a college student, life is more about creative problem solving than it is about logical.
Although, it is a neat idea. Will physics students be allowed to design experiments, or will others get similar "bonuses" to their college application process? I'd like to hope so.
Down with Standardized Tests, In With Creative Applications.
I'm about middle of my course of 400 CompScis, and it took me all of five minutes to 'crack' the code, and solve the puzzle. Any kid who's done GCSE Computation (aged 14-16) should be able to work it out in less than half an hour.
Are degree courses that easy to get on to in Canada? I had to get three A levels at grade C or above (and my Uni's not particularly prestigous)!
If anyone's interested in the real story, they should go to this story in the National Post.
/. gets a bad reputation from time to time?)
Amongst other things, it talks about how the code is the first part of the challenge. The coded message leads to a math problem (which is actually kind of fun and has a rather elegant solution). Solve the math problem, and you get into school with the chance to win a scholarship.
Having gone to the site and gone through the decode and solve phases, I can happily report that the "code" isn't really a code at all. As the site hints, it's basically "coded" by being written in base-4. The challenge is really in the math problem, which requires applicants to find the summation of all decimal digits in the sequence of natural numbers from one to one million. While this isn't impossible, it does require some thought and intelligence. I thought it was a great idea for students who liked math and computer science (the problem can also be solved with a simple brute force algorithm) but weren't neccessarily that stellar students nor interested in lengthy University applications.
Heck - I spent an hour coming up with a solution and then verifying it with a quick little Java program. It was fun! Give it a shot!
(As a Troll-y sidenote, I'd like to mention with some degree of bitterness that I submitted this story, except when I did it, I got the facts right. Apparently this warrants a rejection, and irrelevant whining about the DMCA warrants approval. Do you ever wonder why
Was it "f u cn rd ths, u cn gt a gd jb n cmptr prgrmmng."?
Enquiring minds &c.
Tony.
-- "Quis custodiet ipsos custodes?" -- Juvenal
]:8)
Does this strike anyone else as a great way to get someone else to finish up the work on your thesis for you?
A = /001 /002
B =
etc. Numbers, dates and punctuation not included.
Answer's 27,000,001 in case you were wondering.
Just because you're paranoid doesn't mean they're NOT after you.
If you have to know crypto-analysis in order to get into college, where are you supposed to learn crypto-analysis? Or is Canada yet another of those countries where university != college?
Actually, it DOES apply. Professor Felten was asked to break it as part of a competition, but was then prosecuted fo it. Also, Dmitry Sklyarov was not asked to break Adobe's encryption, but a precedent was set when Adobe chose not to prosecute him, but the US government decided to prosecute him in federal court because breaking encryption broke the CRIMINAL LAW aspect of the DMCA.
It is definitely feasible that a college student breaking the encryption on an encrypted message, even when specifically asked by his college to break the encryption on a message given to him by his college, would be at risk for prosecution under the DMCA. It is a very broad piece of legislation, the specific wording of which could easily be held up in court in a variety of cases, regardless of whether or not the defendant was asked to break the encryption and whether or not the person that originally encrypted it had a problem with it.
I doubt they even bothered to copyright it.
Anything you write is automatically copyrighted. You don't have to register it or anything anymore.
It's not enough to bash in heads, you've got to bash in minds. - Captain Hammer
The digits 1-9 appear an equal number of times from 1 to 999,999. That is, if you write out all the numbers in a vertical column, each column will have 100,000 1's, 100,000 2's, etc, except in a different order which doesn't matter.
The sum of 1 to 9 is 45. so the sum of each column is 45 * 100,000 = 4,500,000. There are six columns of digits, so multiply that by six to get 27,000,000. Now add the sum of the digits of 1,000,000.
The answer: 27,000,001
I lived in Lethbridge for a few months over ten years ago. It was a small town then and still is, as you can see here (less than 70,000 population).
IMHO, Southern Alberta is an attractive region if you're into farming or ranching, but doesn't generally have a large enough population to support the University of Lethbridge on its own. Calgary is only a couple hours away by car, and tends to draw the more city-minded students.
It seems the U of Lethbridge has to use these clever gimmicks to attract enough students from outside the region to keep itself viable. By making the crypto test relatively simple, it taps into the ego of a wider number of prospective students.
Pretty smart marketing move, actually.
Anybody want a peanut?
2) with euler's method (well, one of euler's methods [n*(n+1)/2])
This would give you the summation of all natural numbers between 1 and 1000000. The question, however, is to find the summation of all decimal digits appearing in the sequence.
For example, 324 would contribute a total of 9 to the total sum.
So, the sum of 0..10 = 46
the sum of 0..100 = 901
the sum of 0..10^n = (n * 10^(n-1) * 45) + 1
In our case, we're looking for 0..10^6, so
= (6 * 100000 * 45) + 1
= 27000000 + 1
= 27000001
As I said, a little more complex, but not impossible to figure out if you take out pencil and paper and think about it.
To verify, simply create a brute force algorithm that loops from 1 to 1000000, where the loop code either uses mod and div to isolate the value of each digit of a number, or some funky string-integer transformations.
Y'all are freaking retarded. If there is anything that the Skylarov(sic), the copyright holder doesn't have to grant the Government permission to charge someone with a crime. The DMCA is very much a Criminal law as much as a Civil law. Even after adobe backed out, he still got charged for the crimes committed. In this case, I doubt anyone would get charged. Doesn't mean it couldn't or wouldn't happen.
You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
'nuff said.
Wow! I just made a poem!
You're using her as bait, Master!
First off, I went into the site and couldn't even figure out the navigation well enough to even want to go through it. And, for a scholarship don't they think they could have come up with a little bit of a harder problem? After giving up on their silly site, I perused slashdot and was kind of disappointed that it was that silly.
The college I attended had an annual competition where high school students built robotics or coded something, and would give out some degree of scholarships or other financial assistance towards prospective students and I can tell you that anybody who wrote a program to find the summation of all natural numbers would be laughed out. These were things like kernels, AI schemes, language recognition applications. I fail to see the cool factor in this. Any nerd deserving a scholarship for brains alone should really be challenged and not something that can be solved by a 2 minute script.
Dacels Jewelers can't be trusted.
Y'all are freaking retarded. If there is anything that the Skylarov(sic), the copyright holder doesn't have to grant the Government permission to charge someone with a crime. The DMCA is very much a Criminal law as much as a Civil law. Even after adobe backed out, he still got charged for the crimes committed. In this case, I doubt anyone would get charged.
Doesn't mean it couldn't or wouldn't happen.
You can't legislate goodness. Let each to his own destiny, by will of his freely made choices.
Nope, in fact many Canadian universities are very well respected. The difference here is, in Canada we believe in education for EVERYONE, or at least for the most possible. Not money, nor family connections, matter.
Of course, once you're in it's a whole different story. You still have to do the work involved, but there's no high-pressure entrance exam (at least not for a lot of Canuck schools) or insanely high fee. Kinda why we use a lot of government money in one of the few subsidies I can stomach: post-secondary education.
There's a reason why a majority (or so it seemed coming from my less-than-average high school) of Canadian kids go to University/College. No, it's not for everyone, and yes, a LOT of Canadians don't have degrees/diplomas. But usually, that's because of the student's performance AFTER getting out of high school (which is basically just a big social club where we learn algebra, anyway
Endless arguments over trivial contradictions in books written by ignorant savages to explain thunder in the dark.
The hard part is to get the text corresponding to the encoded message so that you don't have to type it in. The ULeth Press Release has a JPEG (are you supposed to do OCR?), and the Go Figure web site has a really messy navigational structure and the message hidden in a PDF file. Now, getting it out requires experience with Adobe Acrobat or some other PDF tools. That's much harder than undoing the simple encoding or solving the trivial math problem.
Felten was never prosecuted, he was threatened with prosecution. I could threaten you with prosecution for spreading false information, but that certanly wouldn't make it a crime
autopr0n is like, down and stuff.
I'm a senior in highschool and I "cracked" the "code" in about 6min....The hardest of the whole thing was running find and replace for their base 4 alphabet(I was too lazy to write a script for it), and then punching some numbers into my scientific calculator. I wish some US schools would do this, then maybe I could afford to go to the schools I get accepted to.....
-sonicsft
The NSA has some fun problems on its USA Mathematical Talent Search (USAMTS) page.
2^(2^(2^2 + 1) - 1) - 1 = 2^31 - 1: Mersenne prime
The biggest trick the devil pulled was letting lawyers become politicians so they can write the laws.
Cryptnotic
My other first post is car post.
*Sigh* For the millionth time, Slashdot is NOT a journalistic institution. Yes, I KNOW that it says 'News for Nerds.' Ignore it--it's just a cute tagline and nothing more. Slashdot is a place that links to OTHER places and that lets you see pretty much raw commentary from others. Quit whining about the declining 'journalistic quality' of Slashdot--it never had any to begin with and nobody ever pretended that it did. Sheesh.
In the old times of FidoNet, I shared a BBS with several students. I was teaching computer science 101 then. At 00:00 AM, 8 hours before the exam, I posted the exam to the BBS, in postscript (with the first line deleted, so that it was not inmediately recognizable as such), and compressed with zoo (not a very popular compressor, now and them). I put a rubbish name on top, so that, well, it wasn't only using zoo and ghostview. I sent a message to the 3 students telling them that I had posted the message in the file area, without telling them the name or anything else. They managed to "crack" it the next morning, 2 hours before the exam. The zoo part was easy (it includes "zoo" as the first letter in the file), the PS file a bit harder, and the hardest part, 10 years ago, was to find a program to print PS (download it thru fidonet and all the stuff).
They passed, but not with high marks; after all, they had only a couple of hours to prepare it. They would have been better off studying thru the night...
It's just a BloJJ
I decoded the message. I guess I'm bored. I didn't quite get the numerals in the address though.
TO WIN A SCHOLARSHIP
FROM THE UNIVERSITY
OF LETHBRIDGE
DO THE MATH.
FORMULA:
FIND THE SUM OF ALL DECIMAL
DIGITS APPEARING IN THE NATURAL
NUMBERS FROM ONE TO ONE MILLION
INCLUSIVE.
CONTEST ENTRIES MUST BE
RECEIVED BY DECEMBER 12/31/01
TO ENTER ONLINE: VISIT
WWW.ULETH.CA AND SUBMIT YOUR
ANSWER.
MAIL: SEND YOUR ANSWER, ALONG
WITH YOUR NAME, FULL ADDRESS AND
PHONE NUMBER TO GO FIGURE WHAT
MAGAZINE,108/,93/ LOMBARD AVENUE,
WINNIPEG, MB, R3/B3/B1/.
Computed as follows:
0 + 1,000,000 = 1E6
1 + 999,999 = 1E6
2 + 999,998 = 1E6
...
499,998 + 500,002 = 1E6
499,999 + 500,001 = 1E6
and 500,000 left over.
so, we have 500,000 pairs equaling 1E6, giving 5E5 * 1E6 = 5E11. Add 5E5 left over, and you get your answer of 5.000005E11 = 500000500000.
Confirmed with the following bc program:
total=0;
for(i=0;i<=1000000;i++)
total+=i;
total
Using your sig line to advertise for friends is lame.
All he'd need is a valid disclaimer. If he is creating his own crypt method then he just needs to say that it's ok to break it. Surely?
Do any of you guys try to find stuff out on your own, or do you just regurgitate the shit that Slashdot feeds you.
The DMCA is about copyright, not about decrypting a message in base four. Geez. If Adobe (as just a hypothetical example) decided to encrypt their PDF files in base four, then it would be illegal to decrypt those files. But it would NOT be illegal to decrypt any non-PDF base four encodings. The DMCA is Evil enough without you inventing yet new Evils for it.
In summary, no one needs any damn disclaimer to use base four (or rot13). Get real.
A Government Is a Body of People, Usually Notably Ungoverned
The difference here is, in Canada we believe in education for EVERYONE, or at least for the most possible. Not money, nor family connections, matter.
At least, we like to think so, and our government sure likes to tell us so. Too bad the statistics say otherwise. Basically, if you're poor, you have only half the chance of attending university of someone who's rich. That may be better odds than the states, it may not, but it definitely doesn't fit with the "money doesn't make a difference" line.
As for tuitions, Canadian university tuitions work out to about the same as many US universities and colleges. In fact, unless they're going to a University away from home, the average American student can wind up paying less thanks to the larger number of scholarship/grant programs available.
Of course, if you're Canadian, you can work on changing this. Start with your MLA and be sure to send a copy on to your MP. If enough people bring the issue up to the electeds, maybe they'll finally start doing something about it.
That Jesus Christ guy is getting some terrible lag... it took him 3 days to respawn! -NJ CoolBreeze
Your right, that scholarship should have gone to someone in athletics instead so he could get his CS degree. I think this is a good way of FOCUSING on students that normally wouldnt have as many chances at scholarships as your head of the football/hocky team types. Yes in some cases breaking encryption wouldnt be that hard, but how many people at your school would know how to, or even know how to spell encryption to begin with.
I don't mean to burst your bubble, people, but this was aimed at pre-University 16-19 year olds. Unless you're in this age range I don't think it's a huge deal to have solved it...
Except, of course, uncopyrightable material, such as math problems as they were dealing with in this case.
D.. M.. C.. A..
Don't Mess with Company Assets
Decieving Many Consumer Assholes
Devious Money Consumes All
Diabolical Medling Corporate Attorneys
Etc.. etc..
EVERYBODY NOW.. It fun to violate the D.M.C.A..
D.M.C.A.
Starsucks
You've got the 'dedicated' people who can plow through the crap. You've got the 'smart' people who are bored silly, and there's no alternative for them, so they skate by on Cs and Ds. You've got the 'challenged' people, who DO have an alternative (special programs out the wazoo) and get the care and extra attention they deserve. You've got the 'average' students for whom the entire general cirriculum is geared for. So in academic terms, being terribly bright, as we all know, is quite the detriment. Yes, y'all can come up with ten thousand counterexamples, but this is, by and large, true and accurate. I guess for America I can add 'those good at sports, who are sailed through the other classes' and 'those with connections or rich daddies' but that's all based on hear-say. :-)
Vintage computer games and RPG books available. Email me if you're interested.
This is a harder problem than you might think, but it's not helped by the idiots who can't even understand the question and try to add the numbers 1 to 1,000,000.
That would mean that the average digit sum of a number was 5, which is clearly wrong.
I happened to find the same result as the parent ((45 * (10 ^(n-1)) * n) + 1), which makes it likely to be right. That gives 27.000.001.
Method: See that all possible combinations of 6-digit numbers are in the range 000000...999999. Then for a given digit all numbers occur with the same frequency due to symmetri. Then the average contribution of that digit is sum(0..9)/10=45/10. Then the average contribution of a 6-digit number is 6*45/10. There are 1.000.000 numbers in 000000...999999, so we multiply the average with 1000000. Now we have the sum from 1-999999, but we needed the sum 1-1000000, so we add digitsum(1000000)=1.
The result is then 45/10*1.000.000*6+1 = 45*100.000*6+1=45*10^(6-1)*6+1. Generalize the number of digits and you get the formula above.
Cuecat was pretty trivial, too, remember?
The complexity of the object does not seem to mitigate the draconian principle being applied to it.
The point is about solving a problem. It is about the thought processes involved, not necessarily the difficulty involved in the encoding technique. What the fsck do you expect them to do? Publish a 1024 bit PGP encrypted problem and have potential candidates use distributed.net to crack the code?
Sheesh! Give them some credit. It's better than the usual approach to University entrance (a letter from daddy, with a fat cheque, to the dean).
Now bugger off and get out to the curb, the school bus is coming any minute now.
:wq
After all, the encryption they broke wouldn't have been a major company's. Remember, the DCMA only applies if you break the encryption of a company (or if a company feels that your breaking the encryption in any way impacts their bottom line). Then that company releases the lawyers on you. While the students would have technically violated the DCMA, they wouldn't go to jail over it. (Ok, I know that the DCMA really applies in all cases, but for all practical purposes it will only come into play if a company with lawyers feels threatened by the code cracking.)
My sci-fi novel, Ghost Thief, is now available from Amazon.com.
The hardest of the whole thing was running find and replace for their base 4 alphabet(I was too lazy to write a script for it)...
:-)
You know, Thomas Edison (aka. the a**hole who ripped off Tesla) supposedly said that "Genius is 1% inspiration and 99% perspiration". I'd say the same saying applies to undergraduate-level university work. If someone is "too lazy to write a script for it", they might find university level CS surprisingly hard even if they're the next Alan Turing.
(Yes, I know you're just trying to make a point. But so am I
Freedom: "I won't!"
First, Professor Felten WAS NOT PROSECUTED FOR BREAKING THE ENCRYPTION. He faced prosecution for publishing and presenting his work. That is a HUGE distinction. Obviously, it's something I still disagree with; but it's important to get the facts right.
Second, it may be feasible that a college student could be charged with something under the DMCA if the university got some bug up its arse over him/her; but it would require an idiot of a prosecutor. The university invited the act, and it would end up much as if they had hired the kid to break into their own office as a test of security. Weird things happen, so I'd never say never; but let's try to show a bit more reason.
Hot Damn! It's the Soggy Bottom Boys!
The DMCA is a bad law, but it does NOT prevent anyone from doing cryptography or breaking it. It ONLY applies to circumvention of access control to a COPYRIGHTED WORK. It is copyright law, not encryption law.
I think slashdot is perpetuating misunderstanding about this law, and I think that hurts our cause. Being informed is the first and most important step. Otherwise, we are just clueless zealots.
<?php
.= "012/102/033/031/ 110/020/011/ 111/032/021/112/011/102/103/021/110/121/\n";
.= "033/012/ 030/011/110/020/002/102/021/010/013/011/\n";
.= "\n";
.= "010/033/ 110/020/011/ 031/001/110/020/.\n";
.= "\n";
function to_letter($code) {
if (is_numeric($code)) {
return chr(64 + base_convert($code, 4, 10));
} else {
return $code;
}
}
$data = "110/033/ 113/021/032/ 001/ 103/003/020/033/030/001/102/103/020/021/100/\n";
$data
$data
$data
$data
$data
// etc.
$data = split("/", $data);
foreach ($data AS $char) {
echo nl2br(ereg_replace("[0-9/]", "", $char));
echo to_letter($char);
}
?>
If you look at all combinations from 000,000 to 999,999 (might as well include zero), each digit in each position appears 100,000 times. So, since the sum of 0 to 9 is 45, the summation for each digit position is 4.5e6. So, the total for six digits is 27e6. Add 1 for the 1,000,000 final input number, and you get 27,000,001. Now where's my degree?
I had Wolf for Linear Algebra. Great guy.
The problem took me 10 minute 30 to solve...
-Dave
Let's not stir that bag of worms...
No. Or, rather, it'd get thrown out and the prosecutor ridiculed. Go read the law.
Only the dead have seen the end of war.
Anything you write is automatically copyrighted. You don't have to register it or anything anymore.
You have to register it if you want to collect damages when you are violated. Otherwise, if you just want to control use of your work, you're correct.
Seriously... And sadly...
Contrary to popular belief, coding is not all free blow-jobs and beer. Those things cost MONEY!
I borrowed/stole someones sig.. =P
I think they were watching that part from a beautiful mind, where John Nash saw the numbers lighting up that were the correct sequence of numbers. Is that what they're hoping for? Come on, CS has alot more to do with other things than crytography. We have crytography here as a two credit hour seminar in CS. Figuring out an encrytion key != brilliant computer science student. More likely means that they are good at figuring out patterns. What about the 7 bridge 2 river problem from discrete math. That would be a more logical problem to try.
Perhaps figuring out the navigation to their site is another part of the challenge. ;-)
To get something done, a committee should consist of no more than three persons, two of them absent.
for those who enjoy simple cryptanalysis:
perl -0777pe'$a="a";s/[a-z]/$b{lc$&}||=$a++/gei' filename
I use paragraphs of Jane Austin from Project Guttenburg to feed the cypher generator.
Quattuor res in hoc mundo sanctae sunt: libri, liberi, libertas et liberalitas.
Ok, I'll go along with that, but I wouldn't be surprised if intelligence does improve after 16, just not nearly as much as it used to. Sort of like how you can learn foreign languages no matter how old you are, but you learn them a lot faster at age 6.
My criticism was aimed at those people who were complaining about how easy it was; I felt they were the ones taking away from the legitimate 16-19 year olds who don't have that CS degree and mathematical training to help them. I have a great deal of respect for those who the problem was aimed at, and managed to solve it.
The program in the previous reply calculates it as 27,000,001 and the following link shows the shortcut method I used: http://www.cpa.us.mensa.org/solutions.html
The sum of digits in the 6 and 7 digit numbers, aka sum of digits of natural numbers from 100000 to 9999999, inclusive, is 312749999.
Why am I replying to an abusive AC again?
Just because you're paranoid doesn't mean they're NOT after you.
IE: the lower numbners repeat many times.
So what? Each digit position ultimately shows each digit 0-9 the same number of times and addition is totally commutative.
int main( int argc, char *argv[] )
{
long i, sum;
for (i=1,sum=0; i
crap...
int main( int argc, char *argv[] )
{
long i, sum;
for (i=1,sum=0; i <= 1000000; i++) {
sum += (i/1000000)%10 + (i/100000)%10 + (i/10000)%10
+ (i/1000)%10 + (i/100)%10 + (i/10)%10 + i%10;
}
printf("sum = %ld\n", sum);
return( 0 );
}
$ a.out
sum = 27000001
What is wrong with Slashdot <TT> indentation?