|
|
|||||||
============= The Challenge - Luhn's Mod ============= In 1954, Hans Luhn of IBM proposed an algorithm to be used as a validity criterion for a given set of numbers. Almost all credit card numbers are generated following this validity criterion…also called as the Luhn check or the Mod 10 check. It goes without saying that the Luhn check is also used to verify a given existing card number. If a credit card number does not satisfy this check, it is not a valid number. Out of the 16 numbers on a typical credit card, the set of first 6 digits is known as the issuer identifier number, and the last digit is known as the “check digit” which is generated in such a way as to satisfy the Luhn or Mod 10 check. For a 16 digit credit card number, the Luhn check can be described as follows: 1. Starting with the check digit, double the value of every second digit (never double the check digit). For example, in a 16 digit credit card number, double the 15th, 13th, 11th, 9th…digits (digits in odd places). In all, you will need to double eight digits. 2. If doubling of a number results in a two digit number, add up the digits to get a single digit number. This will result in eight new single digit numbers. 3. Now, replace the digits in the odd places (in the original credit card number) with these new single digit numbers to get a new 16 digit number. 4. Add up all the digits in this new number. If the final total is perfectly divisible by 10, then the credit card number is valid (Luhn check is satisfied), else it is invalid. Example: Code: 4 5 5 2 7 2 0 4 1 2 3 4 5 6 7 8 <-starting card number, last digit is the check digit 8 10 14 0 2 6 10 14 <-doubled value of every second digit starting from right 8 1 5 0 2 6 1 5 <-if the number > 10 add up the digits to get a single digit number 8 5 1 2 5 2 0 4 2 2 6 4 1 6 5 8 <-This is the new number. Add up the digits. =61 <-61 is not perfectly divisible by 10, and fails the test. There are many brands of credit cards, but the following are the only brands your company will accept. Code: Brand Number of Digits Example of a Valid Card -------------------------------------------------------- AmKixpress 15 373633498141735 Kixa 16 4929930484621725 MasterScript 16 5380933823620159 Dectohex 16 6011691716199864 For the purposes of this tournament, and to destinguish between brands, each company always starts it's cards with the same first digit. For example Kixa always starts with a "4". AmKixpress only has 15 digits, however all the others have 16 digits. The Expiration Date and CCV Number are not part of this challenge. ** These are NOT valid credit card numbers. You can't buy anything with these. They are random numbers that happen to conform to the algorithm. ** *-->A download is available at http://www.kixtart.org/forums/ubbthreads.php?ubb=download&Number=208 ============= Specification ============= Determine whether the numbers provided in the input: 1) Passes Luhn's Check 2) Has the proper number of digits for it's issuer 3) Is a card your company accepts ============= Inputs ============= The input consists of a string of numbers. (The limits within Kixtart and such a large number requries that the input be a string.) ============= Outputs ============= 0, 3, 4, 5 , or 6. 0 = Fails any test 3 = Valid AmKixPress 4 = Valid Kixa 5 = Valid MasterScript 6 = Valid Dectohex ================================================================= Notes ===========================================================+==== - The scoring engine is based on older engine, so there may be something like block comments that are not supported. - The scoring engine has added code to help diagnose which cases are failing. To see test case resutls: kix32 kixgolf_lm $verbose=1 - The scoring engine expects your (primary) function to be named a(). ======= Scoring ======= The solution must pass all tests in order for it's KiXgolf Score to be considered. When posting KiXtart Golf Scores, please include the KIXGOLF_*.TXT file that is created in the script directory. It contains some basic information about the computer that the script is run on and the resulting scores. ============ Test program ============ Test cases are provided to help screen entries and to provide the Golf Score. Any script that passes the test cases can be submitted. If you are surprised that your solution passed the test cases, please submit it anyway! That will help me identify bugs in the test program. ================================================================ KiXtart GOLF - How To Play ================================================================ Most importantly, anybody can play, no age restrictions, no penalties, no handicap! The object in "real" golf is to hit the ball in the hole in the fewest strokes. The object in KiXtart Golf is to get from input (tee) to target (hole) in the fewest keystrokes. Example: How many positive elements are in array $a? Array $a could be of structure $a=[1, 2 ,-3, 4, -5, -7, 8, 9] One approach: Code: for $b=0 to ubound($a) if $a[$b]>0 $c=$c+1 endif next for a score of 45. Another solution is: Code: DO $b=$b+1 if $a[$b]>0 $c=$c+1 endif UNTIL $b>(UBOUND($a)+1) for a score of 53. Better approach: Code sample 1 ================================================================ KiXtart GOLF - The Rules ================================================================ 1) The goal of KiXtart Golf is to score the lowest strokes. 2) Strokes are all characters in a piece of code except whitespace characters, unless the whitespace character is necessary for the line of code to work. Therefore, carriage returns and line feeds do not count or spaces in between the '=' sign when assigning variables, e.g. '$a = $b' scores 5. 3) Code can be constructed any way you like, as long as it does not generate syntax or other errors when running the script in KiXtart. 4) The final solution MUST pass all test scripts that are part of the KiXtart golf challenge. 7) During the private coding phase, no code is allowed to be posted. Violations result in disqualification of said player. 8) During the public coding phase, code should be posted, reused, and borrowed from other players. 9) The test script contains the official KiXgolf scoring engine 10) Only the person posting a particular score will be recognized for the score, unless the KiXtart Golf Challenge organizer or another delegate posts code on behalf of a player 11) KiXtart Golf (a.k.a KiXgolf) codes must be written inside the KiXgolf UDF collection tags, ';!' and ';!;!' 12) Parameter names of the UDF's can be changed and additional optional parameters can be added. 13) Additional helper UDFs and code can be written as long as they reside inside the ';!' and ';!;!' tags. 14) The use of '$' as a variable is allowed. 15) The UDF layout is up to coder. 16) The UDF is expected to finish in a reasonable time, that is, on modern computers inside 1 hour timeframe. 17) You can submit scores as often as you want. 18) If you reach leading score, you are obligated to post your score immediately so others can try to compete with you. 19) The UDF may only use the KiXtart/KiXforms commands/functions/macros, no other code fragments are allowed. 20) Calls to COM components that are part of a standard default Windows installation are allowed. 21) The use of the KiXforms DLL is also permitted as the KiXforms DLL can now be considered an integral part of KiXtart scripting. 22) Calls to other executables, as long as they are part of a standard default Windows installation are allowed. 23) The UDF should be self-contained (except for any I/O mentioned in the challenge). In particular, you may not do things like fetching extra data from a remote site or file. 24) You may assume ASCII as character set. 25) You may use block comments as the KiXgolf Scoring Engine now supports block comments. 26) You are allowed to only use publicly available versions of KiXtart and KiXforms, private builds or alpha builds are NOT allowed. 27) Your submitted score must include the result print of the KiXgolf test-engine. 28) The SETOPTION() parameters in the KiXgolf script may not be modified and will govern the script behavior. SETOPTION() parameters may change depending on the particular needs of the KiXgolf challenge. 29) Tokenizing the UDF, script, or portions thereof is not allowed. 30) If something is not explicitly denied by the rules, it's allowed. 31) If Confusion arises, arranger of the KiXgolf round has the final say. 32) Additional test cases can be added at any time during the KiXgolf round. The code is expected to pass based on the rules. The test cases may not include tests for all rules and exceptions. Test cases that are added during the public round will not alter the results of the private round. ================================================================ KiXtart GOLF - The Duration of the Competition ================================================================ 1) Private coding phase: 2010-08-01 to 2010-08-08 (Official Count down clock will determine end time) 2) Public coding phase: 2010-08-08 to 2010-08-15 3) Final results: 2010-08-16 *--> You will need the complete package from http://www.kixtart.org/forums/ubbthreads.php?ubb=download&Number=208. |
||||||||
|
|
|||||||
Count down clock removed. |
||||||||
|
|
|||||||
Hey Al, your dl lnk is 404 |
||||||||
|
|
|||||||
I say it's a multi-stroke penalty for Allen for holding a tournament on a closed course! Glenn |
||||||||
|
|
|||||||
|
||||||||
|
|
|||||||
Sorry... I know it was working... I'll just put it here... hang on... |
||||||||
|
|
|||||||
Okay... links updated. The first link was directly to the file on SkyDrive... I guess they update the links or something. |
||||||||
|
|
|||||||
It works! Code: KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 10:15:55.842 Processing End = 2010/08/02 10:15:55.873 Duration = 0000/00/00 00:00:00.031 # Tests Run = 50 # Tests Passed = 50 # Tests Failed = 0 Result = passed KiXGolf Score = 220 |
||||||||
|
|
|||||||
What is your score Glenn? |
||||||||
|
|
|||||||
It was several hundred, but I have a bunch of debug statements in it.. I'll post the full output with the score with I trim the debugs out. I have to head to a meeting now - be back later. Glenn |
||||||||
|
|
|||||||
hmm .. my score is 140 but code fails, dunno why though |
||||||||
|
|
|||||||
Did you try the $verbose=1 to see your results? |
||||||||
|
|
|||||||
Time to start shredding some strokes... KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 14:25:58.297 Processing End = 2010/08/02 14:25:58.375 Duration = 0000/00/00 00:00:00.078 # Tests Run = 50 # Tests Passed = 50 # Tests Failed = 0 Result = passed KiXGolf Score = 249 |
||||||||
|
|
|||||||
Aye, in the mean time it validates against amount of digits Funny behaviour still: works for AmKixpress, but fails to validate Kixa, MasterScript and Dectohex Score 178 Edit: Nice First Score Maciep! |
||||||||
|
|
|||||||
Yay! |
||||||||
|
|
|||||||
Well done, Jochen! KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 15:08:12.390 Processing End = 2010/08/02 15:08:12.390 Duration = 0000/00/00 00:00:00.000 # Tests Run = 50 # Tests Passed = 50 # Tests Failed = 0 Result = passed KiXGolf Score = 215 |
||||||||
|
|
|||||||
Nice shave Mace, KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2400 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 21:22:58.157 Processing End = 2010/08/02 21:22:58.173 Duration = 0000/00/00 00:00:00.015 # Tests Run = 50 # Tests Passed = 50 # Tests Failed = 0 Result = passed KiXGolf Score = 180 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
another classic "attaching-a-function-result-to-an-already-used-variable-rather-than-writing-teh-same-function-3-times-in-a-
|
||||||||
|
|
|||||||
This one was a math-101 moment, aka: when you see it you'll sh* bricks KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2400 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 22:29:53.476 Processing End = 2010/08/02 22:29:53.491 Duration = 0000/00/00 00:00:00.014 # Tests Run = 50 # Tests Passed = 50 # Tests Failed = 0 Result = passed KiXGolf Score = 168 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2400 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 22:47:45.428 Processing End = 2010/08/02 22:47:45.443 Duration = 0000/00/00 00:00:00.014 # Tests Run = 50 # Tests Passed = 50 # Tests Failed = 0 Result = passed KiXGolf Score = 162 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Just to be 100% I am adding 4 more test cases. If your code is right, these shouldn't matter. I'll update the tester download asap. 3456789012345675=0 456789012345671=0 567890123456781=0 678901234567899=0 |
||||||||
|
|
|||||||
Quote: This one was a math-101 moment, aka: when you see it you'll sh* bricks LOL! Pretty sure I know which UREKA! moment this was. |
||||||||
|
|
|||||||
|
||||||||
|
|
|||||||
Finally got back to this tonight, but it's not gonna be easy to catch Jochen! Code: KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 21:43:02.602 Processing End = 2010/08/02 21:43:02.634 Duration = 0000/00/00 00:00:00.032 # Tests Run = 50 # Tests Passed = 50 # Tests Failed = 0 Result = passed KiXGolf Score = 183 |
||||||||
|
|
|||||||
Hey Eric... Add the 4 new tests to your ini. I just added them this evening. |
||||||||
|
|
|||||||
Yeah I saw that right after I posted....algorithm is still tight Code: KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 22:00:26.734 Processing End = 2010/08/02 22:00:26.780 Duration = 0000/00/00 00:00:00.046 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 183 |
||||||||
|
|
|||||||
just wanted to get on the board... KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Ultimate Edition CPU = Intel Pentium III Speed = 2333 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/02 22:41:12.982 Processing End = 2010/08/02 22:41:12.998 Duration = 0000/00/00 00:00:00.016 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 235 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
morning guys, new test cases verified: KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2399 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 06:24:59.741 Processing End = 2010/08/03 06:24:59.757 Duration = 0000/00/00 00:00:00.015 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 162 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
hello hello. I was told to finally tee off... guess I will do that then. |
||||||||
|
|
|||||||
ok, is the checkdigit supposed to be included in the calculations too? that just doesn't make any sense. |
||||||||
|
|
|||||||
no, guess that wasn't it. what do I miss here? the tester says this should result in 3: 378282246310005 but manually calculating I get: 677272443320005 thus, 52 = FAILURE all my amkixter tests fail and I don't see why they should result in any different outcome. help! |
||||||||
|
|
|||||||
Hey Lonkero, you need to start on the right with the check digit, and then work your way to the left The check digit isn't doubled, but it is included when adding the numbers up 378282246310005 358484286610005 3+5+8+4+8+4+2+8+6+6+1+5=60 |
||||||||
|
|
|||||||
lol. damn. right, left... who could have known? |
||||||||
|
|
|||||||
I'm not finding much time to put into this, sadly.. Did manage to shave 18 strokes from my original code, though. Code: KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 08:20:30.783 Processing End = 2010/08/03 08:20:30.799 Duration = 0000/00/00 00:00:00.015 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 202 |
||||||||
|
|
|||||||
my reversed code still fails those amkix ones |
||||||||
|
|
|||||||
k, my first attempt at this: Code: KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1995 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 16:16:14.451 Processing End = 2010/08/03 16:16:14.535 Duration = 0000/00/00 00:00:00.084 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 186 |
||||||||
|
|
|||||||
second... Code: KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1995 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 16:37:44.652 Processing End = 2010/08/03 16:37:44.732 Duration = 0000/00/00 00:00:00.080 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 172 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
171 |
||||||||
|
|
|||||||
167 |
||||||||
|
|
|||||||
163 |
||||||||
|
|
|||||||
162 |
||||||||
|
|
|||||||
guess it's my time to call it a day, huh? Code: KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1995 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 17:40:54.079 Processing End = 2010/08/03 17:40:54.149 Duration = 0000/00/00 00:00:00.069 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 156 |
||||||||
|
|
|||||||
nevermind... Code: KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1995 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 17:45:23.901 Processing End = 2010/08/03 17:45:23.939 Duration = 0000/00/00 00:00:00.038 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 154 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
|
||||||||
|
|
|||||||
Oh Hai Jooel, found the flow, eh? Will have to work on this from scratch to lessen by 9 strokes |
||||||||
|
|
|||||||
maybe not though KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2399 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 21:06:32.291 Processing End = 2010/08/03 21:06:32.306 Duration = 0000/00/00 00:00:00.014 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 161 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
two more .. getting harder. KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2399 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 21:15:55.744 Processing End = 2010/08/03 21:15:55.759 Duration = 0000/00/00 00:00:00.014 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 159 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
uh. |
||||||||
|
|
|||||||
I can't find anything. have to get a revelation to shorten mine. |
||||||||
|
|
|||||||
hnnnng .. got one long line in it which smells like being far too long, but can't be shortened. Brain hurts! |
||||||||
|
|
|||||||
you can always divide to smaller ones so it doesn't look so bad anymore |
||||||||
|
|
|||||||
wtf? Code: KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1995 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/04 00:17:47.581 Processing End = 2010/08/04 00:17:47.615 Duration = 0000/00/00 00:00:00.034 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 148 Thank you for participating in KiXtart Golf! Press any key to continue... |
||||||||
|
|
|||||||
Getting back to it... Code: KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/03 19:42:52.720 Processing End = 2010/08/03 19:42:52.782 Duration = 0000/00/00 00:00:00.062 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 170 |
||||||||
|
|
|||||||
165 |
||||||||
|
|
|||||||
Hanging it up for the night KiXGolf Score = 164 |
||||||||
|
|
|||||||
Originally Posted By: Lonkero wtf? Code: KiXtart KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1995 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/04 00:17:47.581 Processing End = 2010/08/04 00:17:47.615 Duration = 0000/00/00 00:00:00.034 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 148 Thank you for participating in KiXtart Golf! Press any key to continue... WTF indeed!! Additionally I can feel Macies breath in my neck |
||||||||
|
|
|||||||
Crap, I can't even get started. Forgive my dullness, but two questions, where do I put my code and are the values in the ini file of any importance? I think we are just interested in the keys, correct? |
||||||||
|
|
|||||||
the code does belong in kixgolf_lm.udf in between: Code: function a($) ;code 'ere endfunction Your code will be called by kixgolf_lm.kix (no changes allowed) and will be validated against the keys in kixgolf_lm.ini (no changes alllowed too), so your code should return the same values as the different key values in the ini. Let's look closer at that: for example: 378282246310005=3 The key 378282246310005 will be passed as a string to the function you write and will be validated against the return value your function returns. In this particular case, your function should recognize this string as a valid "AmKixpress" Credit Card number and return 3 (integer) .. The score will be counted by the scoring engine, so all characters between these flags will be counting (if not commented out): Code: ;! <- Flag for start of scoring engine function a($) ;<-Score +12 endfunction ;<-Score +11 ;!<-|these two flags ;!<-|stop scoring engine hope this helps, and have fun solving the problem! |
||||||||
|
|
|||||||
Thanks, I'll give it a try tonight. I'll probably be in the 750 range or so. I tend to be verbose. |
||||||||
|
|
|||||||
Hey Brad... make sure to read the Specification, Inputs and Outputs, sections... that should point your code in the right direction. |
||||||||
|
|
|||||||
hmmm, can't seem to remember all the golf shortcuts... Let's see if I can find some tonight Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/04 16:08:20.421 Processing End = 2010/08/04 16:08:20.421 Duration = 0000/00/00 00:00:00.000 # Tests Run = 55 # Tests Passed = 55 # Tests Failed = 0 Result = passed KiXGolf Score = 195 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Hey Rogier, this is not bad for a 2 year abstinence, aye? |
||||||||
|
|
|||||||
|
||||||||
|
|
|||||||
rogier is in the house! still miss hobie and such but already have lots of the old gang playing. me likey!!! |
||||||||
|
|
|||||||
Yo Allen, I noticed that I could cut my code down to 153 strokes without failing the test cases, while not obeying all rules. Please add a valid 16 digit CC number starting with 8 to the test cases |
||||||||
|
|
|||||||
or 7 or 2 or what ever |
||||||||
|
|
|||||||
7-9 is o-kay. 2 makes not much sense. |
||||||||
|
|
|||||||
what you mean? |
||||||||
|
|
|||||||
how about 12? |
||||||||
|
|
|||||||
I played a bit with it ... if I omit test for valid 16digit CCnumbers which are starting with higher values than 6 my code still is passing all tests .. thats what I mean. Therefore: Allen, please add a test case with a valid (Luhn check) 16 digit number starting with 7,8,or 9 .. I am tempted to cheat |
||||||||
|
|
|||||||
temp this! Code: KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1994 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/04 21:21:50.535 Processing End = 2010/08/04 21:21:50.598 Duration = 0000/00/00 00:00:00.062 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 146 Thank you for participating in KiXtart Golf! Press any key to continue... |
||||||||
|
|
|||||||
btw, I just figured out that if you do a creditcard with more than about 254 (give or take) numbers, my newist code fails... |
||||||||
|
|
|||||||
146 .. you Basterd Did a complete rewrite and reached Well, at least I have 2 versions to play with .. |
||||||||
|
|
|||||||
back in the race with new code KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2400 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/04 21:48:59.761 Processing End = 2010/08/04 21:48:59.792 Duration = 0000/00/00 00:00:00.031 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 157 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Thanks for finding these... I figured there were ones I missed. I'm out, but will add them this evening. |
||||||||
|
|
|||||||
See what these do with your "cheat" code: 2345678901234560=0 7890123456789013=0 8901234567890122=0 9012345678901238=0 234567890123454=0 789012345678900=0 890123456789018=0 901234567890129=0 Let me know, and I'll add them to the download. |
||||||||
|
|
|||||||
Trying to get the brain started, but it doesn't seem to wanna turn over Code: KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/04 18:15:16.265 Processing End = 2010/08/04 18:15:16.312 Duration = 0000/00/00 00:00:00.047 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 162 Note: I added the suggested new test cases |
||||||||
|
|
|||||||
I almost have it, but haven't even started to golf! Score is 876 with 3 failures. I know where it is failing, just need to modify my logic a little. How are you capturing the output to a format you can cut and paste? |
||||||||
|
|
|||||||
I got it all to pass with a score of 906. I'm going to bed... |
||||||||
|
|
|||||||
In your directory there is a file called kixgolf_lm.txt... open that up and see your last result. |
||||||||
|
|
|||||||
By the way Brad... Good job... however just getting it to work is only half the fun... finding ways to reduce your code is the other half. You will be surprised by how much you learn doing this... and how much better you will be next time. |
||||||||
|
|
|||||||
you can also edit the window properties to allow quick edit mode. |
||||||||
|
|
|||||||
Originally Posted By: Allen See what these do with your "cheat" code: 2345678901234560=0 7890123456789013=0 8901234567890122=0 9012345678901238=0 234567890123454=0 789012345678900=0 890123456789018=0 901234567890129=0 Let me know, and I'll add them to the download. Jap, these are perfect, bust my 'cheat' code .. 'normal' code passed:
|
||||||||
|
|
|||||||
Wish I could participate. I've been promoted just as one of my guys takes a holiday and the other one's wife has decided to sprog. I can't even find time to back-fill my position let alone the much more important stuff like golfing. Still it's fun to drop by and catch the action. Good to see a new player on the course too. |
||||||||
|
|
|||||||
thanks for taking time to let us know you around though would be awesome if you could tighten the race but can't have everything always :p |
||||||||
|
|
|||||||
Please add the previously suggested cases to your ini or use the updated zip package. (A total of 62 tests) Code: 2345678901234560=0 7890123456789013=0 8901234567890122=0 9012345678901238=0 234567890123454=0 789012345678900=0 890123456789018=0 901234567890129=0 @Drill what is that mysterious number 55 test? |
||||||||
|
|
|||||||
found a little time to work on this. KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Enterprise Edition CPU = Intel(R) Pentium(R) D CPU 3.20GHz Speed = 3200 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 08:56:02.455 Processing End = 2010/08/05 08:56:02.533 Duration = 0000/00/00 00:00:00.077 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 207 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Added the "anti-cheat" codes - I'm clearly missing something to be 40 strokes behind.. Code: KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 10:34:04.059 Processing End = 2010/08/05 10:34:04.122 Duration = 0000/00/00 00:00:00.063 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 198 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
|
||||||||
|
|
|||||||
@glenn, 40? |
||||||||
|
|
|||||||
new tests passed with flying colors Code: KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1994 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 17:49:35.488 Processing End = 2010/08/05 17:49:35.604 Duration = 0000/00/00 00:00:00.116 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 146 |
||||||||
|
|
|||||||
hmm... Code: KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1994 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 18:53:09.790 Processing End = 2010/08/05 18:53:09.850 Duration = 0000/00/00 00:00:00.060 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 145 |
||||||||
|
|
|||||||
It's all slowely coming back to me now :-) Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 18:16:51.187 Processing End = 2010/08/05 18:16:51.203 Duration = 0000/00/00 00:00:00.015 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 160 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Originally Posted By: Allen @Drill what is that mysterious number 55 test? It's the example number... I needed it to make sense of the calculations in the beginning :-) |
||||||||
|
|
|||||||
Trimmed 16! @Lonk - needed 40 just to get close to you and Jochen! My brain doesn't have the Lonkenizer feature to compete head to head with you. Code: KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel(R) Pentium(R) 4 CPU 2.80GHz Speed = 2793 MHz Memory = 1014 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 12:18:46.510 Processing End = 2010/08/05 12:18:46.541 Duration = 0000/00/00 00:00:00.030 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 182 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
drill, bring it on! Code: KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1994 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 19:25:28.973 Processing End = 2010/08/05 19:25:29.074 Duration = 0000/00/00 00:00:00.100 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 143 |
||||||||
|
|
|||||||
k, I guess Polster gave up already... |
||||||||
|
|
|||||||
Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 18:31:54.546 Processing End = 2010/08/05 18:31:54.578 Duration = 0000/00/00 00:00:00.031 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 156 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Enough for me for today Code: KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 12:37:18.277 Processing End = 2010/08/05 12:37:18.308 Duration = 0000/00/00 00:00:00.030 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 179 |
||||||||
|
|
|||||||
Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 18:45:30.796 Processing End = 2010/08/05 18:45:30.812 Duration = 0000/00/00 00:00:00.016 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 150 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 18:47:59.718 Processing End = 2010/08/05 18:47:59.750 Duration = 0000/00/00 00:00:00.032 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 148 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
damn. nice! |
||||||||
|
|
|||||||
Good grief... More changes in score in 2 hours than in 2 days... lol. @Jooel... Still dominating? ;) @Glenn... nice job, I have a feeling if I was playing, you and I would be neck and neck. |
||||||||
|
|
|||||||
OK, just removed my debugging messages. Code: KiXtart KiXtart Version = 4.52 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Media Center Edition CPU = Intel(R) Pentium(R) 4 CPU 3.00GHz Speed = 3000 MHz Memory = 1016 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 14:07:39.303 Processing End = 2010/08/05 14:07:39.318 Duration = 0000/00/00 00:00:00.014 # Tests Run = 58 # Tests Passed = 58 # Tests Failed = 0 Result = passed KiXGolf Score = 361 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 20:15:08.781 Processing End = 2010/08/05 20:15:08.796 Duration = 0000/00/00 00:00:00.014 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 144 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Crap, I must be missing something awful obvious. Code: KiXtart KiXtart Version = 4.52 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Media Center Edition CPU = Intel(R) Pentium(R) 4 CPU 3.00GHz Speed = 3000 MHz Memory = 1016 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 14:33:51.740 Processing End = 2010/08/05 14:33:51.756 Duration = 0000/00/00 00:00:00.016 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 286 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Hmmm.... settle for a tie? ... NAAAH! See you on the flip side ;-) Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 20:42:23.078 Processing End = 2010/08/05 20:42:23.109 Duration = 0000/00/00 00:00:00.031 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 143 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
hmm... time to open a new can... |
||||||||
|
|
|||||||
No new scores from me tonight.. Wrong decision this morning. My once a week ride to the office with the bycicle was overdue and I ignored the clouds that didn't rain the whole night before so it started to rain this morning after about 10 kilometres, no problem. But the whole 30 kilometre ride home was a big fat cold shower So I guess I will hit the pillow soon tonight. cu tomorrow |
||||||||
|
|
|||||||
they would send me out of town when a golf round is going on! but i did take a swing at it.. in the hotel lastnight for about an hour. Code: KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2327 MHz Memory = 512 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 14:26:49.953 Processing End = 2010/08/05 14:26:49.984 Duration = 0000/00/00 00:00:00.030 # Tests Run = 54 # Tests Passed = 37 # Tests Failed = 17 Result = failed KiXGolf Score = 391 Thank you for participating in KiXtart Golf! not sure why it is failing... and have not had the time to debug |
||||||||
|
|
|||||||
don't like ties... Code: KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1994 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 23:12:37.263 Processing End = 2010/08/05 23:12:37.313 Duration = 0000/00/00 00:00:00.049 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 142 |
||||||||
|
|
|||||||
sorry to hear that Jochen. bryce, you will get it right with your second swing. |
||||||||
|
|
|||||||
Originally Posted By: Lonkero don't like ties... I like losing even less :-) Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 22:53:52.531 Processing End = 2010/08/05 22:53:52.562 Duration = 0000/00/00 00:00:00.031 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 140 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
darn! |
||||||||
|
|
|||||||
oh well, whatever! :P Code: KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1994 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 00:46:35.293 Processing End = 2010/08/06 00:46:35.345 Duration = 0000/00/00 00:00:00.051 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 139 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
You guys are amazing. |
||||||||
|
|
|||||||
Allen. I have to read my hotmail more often ! Damn! |
||||||||
|
|
|||||||
OK, this is as far as my brain can go tonight. Code: KiXtart KiXtart Version = 4.52 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Media Center Edition CPU = Intel(R) Pentium(R) 4 CPU 3.00GHz Speed = 3000 MHz Memory = 1016 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/05 19:45:18.649 Processing End = 2010/08/05 19:45:18.664 Duration = 0000/00/00 00:00:00.014 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 266 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Taking the night off, even though I'll probably have to come up with about 50 more strokes to shred if I want to be in this one...great turnout!! |
||||||||
|
|
|||||||
|
||||||||
|
|
|||||||
A night of sleep does the mind good ;-) Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 08:26:26.734 Processing End = 2010/08/06 08:26:26.765 Duration = 0000/00/00 00:00:00.030 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 136 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
not in my case .. stuck at 157. Will need to think of a completely different approach. Wow, 136! I cannot even imagine what you and Jooel are doing there |
||||||||
|
|
|||||||
I'm just watching from the side and it is fun seeing all you guys golfing like crazy. The public round is even better but it usually results in working but unreadable code |
||||||||
|
|
|||||||
Wish I understood the task, golfing isn't a problem, but these tasks I never understand. Respect for you guys |
||||||||
|
|
|||||||
Come on Arend and Mart... Its a string of numbers. You need to read it from right to left. Every 2nd digit you read, double it. If that value is greater than 10, say 14, add 1+4 to get 5, or if it was 16, add 1+6=7. Take these new single digits and stick them back into the original credit card number, and then add all the digits together. If the sum ends in 0, like 50 or 60 or 70, then its a valid credit card. Then you just have to check and make sure it is the proper number of digits and is a card your company accepts. |
||||||||
|
|
|||||||
Ok, now why didn't you explain it like that in the first place? |
||||||||
|
|
|||||||
One correction... replace "greater than 10" with "greater than 9" |
||||||||
|
|
|||||||
This is/was my first stab at hosting one of these and like anything, you learn from your mistakes. To be honest, most of those instructions came, word for word, off another website. If I do this again (and I likely will), I'll put more effort into rewording the instructions. It's a lot more work than I would have ever imagined putting this together. Props to Jens for his past efforts. |
||||||||
|
|
|||||||
I don't know .. but as I read your second description (3 posts ago) I was a bit disappointed that this Golf round is so easy |
||||||||
|
|
|||||||
Nah, only kidding you, Originally Posted By: Allen It's a lot more work than I would have ever imagined putting this together. Props to Jens for his past efforts. I can imagine and I guess we all do appreciate your efforts! |
||||||||
|
|
|||||||
Oh hey, I have found another one... Positive moods can do wonders! KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2399 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 16:44:11.037 Processing End = 2010/08/06 16:44:11.068 Duration = 0000/00/00 00:00:00.031 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 154 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Quote: I was a bit disappointed that this Golf round is so easy Be careful what you wish for... |
||||||||
|
|
|||||||
Originally Posted By: Allen Come on Arend and Mart... .... What Arend said. Didn't get that much of all Golf tasks I've seen in the past but if you explain it like you did just now I do understand it. Too much work to participate this time. |
||||||||
|
|
|||||||
ok, now i am starting to make some headway. KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Ultimate Edition CPU = Intel Pentium III Speed = 2333 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 10:26:15.388 Processing End = 2010/08/06 10:26:15.419 Duration = 0000/00/00 00:00:00.031 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 198 Thank you for participating in KiXtart Golf! Press any key to continue... |
||||||||
|
|
|||||||
KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Ultimate Edition CPU = Intel Pentium III Speed = 2333 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 10:32:00.041 Processing End = 2010/08/06 10:32:00.072 Duration = 0000/00/00 00:00:00.031 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 194 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Ultimate Edition CPU = Intel Pentium III Speed = 2333 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 10:42:54.132 Processing End = 2010/08/06 10:42:54.163 Duration = 0000/00/00 00:00:00.031 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 190 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
It took quite a while to remember this little feature.. Harvest was not bad: KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2399 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 17:47:46.898 Processing End = 2010/08/06 17:47:46.929 Duration = 0000/00/00 00:00:00.030 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 146 Thank you for participating in KiXtart Golf!Wahey Dale, go get Glenn ^_^ |
||||||||
|
|
|||||||
lol, I just realised that Rogier is the only one using 63 tests instead of the official 62 ones. Hey Rogier, is this the one test case that will break our codes like soap bubbles? |
||||||||
|
|
|||||||
nice jochen! damn, roger, you gonna make me work all weekend?!? |
||||||||
|
|
|||||||
Drill stuck the example in his tests... I sincerely hope we have all our bases covered. |
||||||||
|
|
|||||||
Well, I got a whopping 4 strokes reduction. Code: KiXtart KiXtart Version = 4.52 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Media Center Edition CPU = Intel(R) Pentium(R) 4 CPU 3.00GHz Speed = 3000 MHz Memory = 1016 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 20:37:26.362 Processing End = 2010/08/06 20:37:26.378 Duration = 0000/00/00 00:00:00.016 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 262 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Originally Posted By: Lonkero damn, roger, you gonna make me work all weekend?!? That kinda was my assignment ;-p |
||||||||
|
|
|||||||
Waiting on laundry in the hotel room.... GOT IT! now to trim it! Code: KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2327 MHz Memory = 512 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 09:09:18.062 Processing End = 2010/08/06 09:09:19.250 Duration = 0000/00/00 00:00:01.188 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 443 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
ok, laundry is almost done, and i knocked off almost 100 points! Code: KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2327 MHz Memory = 512 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/06 21:53:14.578 Processing End = 2010/08/06 21:53:14.593 Duration = 0000/00/00 00:00:00.014 # Tests Run = 54 # Tests Passed = 54 # Tests Failed = 0 Result = passed KiXGolf Score = 358 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Um, Bryce? You're golfing... they're strokes, not points. Don't forget to update your INI file - there were 8 more tests posted for a total of 62, not 54. The updated tests blow a hole in some shortcut logic. I've been stuck in this sand trap for so long, I'm beginning to think its quicksand. I'm going to head back to the clubhouse and wait for the public round to start. See ya all at the 19th! I hear that the winner is buying the first round! Glenn |
||||||||
|
|
|||||||
got a new code going. already down to 183! |
||||||||
|
|
|||||||
One stroke less :-) I could lower it another stroke but then this test would fail: Code: 4444444444444443=0 so I'll leave that stroke in and propose the test above to be included in the INI. Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.KIX Computer OS = Windows XP Home Edition CPU = Intel Pentium III Speed = 2500 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/07 15:22:01.000 Processing End = 2010/08/07 15:22:01.031 Duration = 0000/00/00 00:00:00.031 # Tests Run = 64 # Tests Passed = 64 # Tests Failed = 0 Result = passed KiXGolf Score = 135 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Originally Posted By: Glenn Barnas Um, Bryce? You're golfing... they're strokes, not points. Don't forget to update your INI file - there were 8 more tests posted for a total of 62, not 54. The updated tests blow a hole in some shortcut logic. I've been stuck in this sand trap for so long, I'm beginning to think its quicksand. I'm going to head back to the clubhouse and wait for the public round to start. See ya all at the 19th! I hear that the winner is buying the first round! Glenn got the new ini... the code is strong! just to damn fat! Code: KiXtart KiXtart Version = 4.60 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows XP Professional CPU = Intel Pentium Model 15 Speed = 2327 MHz Memory = 512 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/07 09:03:18.828 Processing End = 2010/08/07 09:03:18.843 Duration = 0000/00/00 00:00:00.014 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 358 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
my new code shaved to 144. still 9 to go... |
||||||||
|
|
|||||||
Originally Posted By: Lonkero my new code shaved to 144. still 9 to go... That would be a tie... I thought you hated ties? |
||||||||
|
|
|||||||
couple more. KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Ultimate Edition CPU = Intel Pentium III Speed = 2333 MHz Memory = 2048 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/07 09:24:01.543 Processing End = 2010/08/07 09:24:01.574 Duration = 0000/00/00 00:00:00.031 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 185 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
new code at 139. yes, I hate ties they tend to choke you |
||||||||
|
|
|||||||
@Drill, I'll be interested in seeing your code as to exactly how this particular case is different. As suggested please add the following case. 63 Total Tests Code: 4444444444444443=0 If this effects anyone please speak up. |
||||||||
|
|
|||||||
|
||||||||
|
|
|||||||
No effect on my 146 code .. passed all 63 tests. Can't imagine what stroke in mine would fail this |
||||||||
|
|
|||||||
baby steps... KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/07 12:42:45.799 Processing End = 2010/08/07 12:42:45.845 Duration = 0000/00/00 00:00:00.046 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 157 |
||||||||
|
|
|||||||
KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/07 13:19:05.920 Processing End = 2010/08/07 13:19:05.966 Duration = 0000/00/00 00:00:00.046 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 150 |
||||||||
|
|
|||||||
KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/07 13:36:31.777 Processing End = 2010/08/07 13:36:31.824 Duration = 0000/00/00 00:00:00.046 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 142 |
||||||||
|
|
|||||||
Done for now...hope I can get back to this before the private round is over |
||||||||
|
|
|||||||
Adding the 63'rd test still passed, but I'm not in last place anymore! |
||||||||
|
|
|||||||
wtf? Code: KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1994 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/08 03:21:16.360 Processing End = 2010/08/08 03:21:16.524 Duration = 0000/00/00 00:00:00.163 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 134 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
134 is SO far away.... KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/07 23:01:54.012 Processing End = 2010/08/07 23:01:54.059 Duration = 0000/00/00 00:00:00.046 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 138 |
||||||||
|
|
|||||||
I think this is it for me KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/07 23:31:04.710 Processing End = 2010/08/07 23:31:04.757 Duration = 0000/00/00 00:00:00.046 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 137 |
||||||||
|
|
|||||||
Don't say this Mace. There is always something to rearrange in ones code and 4 strokes come often easier than thought. saying this while knowing that there will be no new score from himself |
||||||||
|
|
|||||||
Gawd!! I found another way to spare one more variable but the score didn't change Still 146 Allright, that's it. I give up. Allen, I will PM you with one of my 146 versions, as I don't know if I can make it back until the end of the private round. |
||||||||
|
|
|||||||
Anyone still golfing? |
||||||||
|
|
|||||||
Oh yes! :-D Hardcore math shizzle here ;-) Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows 7 Ultimate Edition CPU = Intel Pentium Model 15 Speed = 2194 MHz Memory = 2040 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/08 14:55:59.564 Processing End = 2010/08/08 14:55:59.583 Duration = 0000/00/00 00:00:00.019 # Tests Run = 62 # Tests Passed = 62 # Tests Failed = 0 Result = passed KiXGolf Score = 132 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
lol. |
||||||||
|
|
|||||||
LOL is right. 3 hours to go... any more? |
||||||||
|
|
|||||||
Damn... Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows 7 Ultimate Edition CPU = Intel Pentium Model 15 Speed = 2194 MHz Memory = 2040 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/08 15:19:22.637 Processing End = 2010/08/08 15:19:22.657 Duration = 0000/00/00 00:00:00.019 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 130 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
I got 132 too it shouldn't work => missing a test case. Code: KiXtart Version = 4.53 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows Vista Business Edition CPU = Intel Pentium Model 15 Speed = 1994 MHz Memory = 2038 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/08 16:33:46.195 Processing End = 2010/08/08 16:33:46.347 Duration = 0000/00/00 00:00:00.152 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 132 |
||||||||
|
|
|||||||
well, you could enter a new test case and maybe break my code? |
||||||||
|
|
|||||||
Please post the case. I'll consider adding time if needed. |
||||||||
|
|
|||||||
Mind if I play through? ;-p Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows 7 Ultimate Edition CPU = Intel Pentium Model 15 Speed = 2194 MHz Memory = 2040 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/08 16:03:35.051 Processing End = 2010/08/08 16:03:35.073 Duration = 0000/00/00 00:00:00.021 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 126 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
dumdedum... Code: KiXtart KiXtart Version = 4.61 KiXGolf Script = kixgolf_lm.kix Computer OS = Windows 7 Ultimate Edition CPU = Intel Pentium Model 15 Speed = 2194 MHz Memory = 2040 MB KiXGolf Scoring Engine Scoring Engine = 3.0.3 KiXtart Golf Score Tournament = KiXtart Golf: Luhn's Mod Processing Start = 2010/08/08 16:07:11.639 Processing End = 2010/08/08 16:07:11.659 Duration = 0000/00/00 00:00:00.019 # Tests Run = 63 # Tests Passed = 63 # Tests Failed = 0 Result = passed KiXGolf Score = 124 Thank you for participating in KiXtart Golf! |
||||||||
|
|
|||||||
Allen, I wouldn't mind if you would add extra time anyway, because of my late submittal of my score. Maybe we should add 12 hours after every new subittal of the lowest score? |
||||||||
|
|
|||||||
Let's consider that late code/time addon for the next tournament. I'd like to keep inside the rules as much as possible. |
||||||||
|
|
|||||||
With no new tests posted, the current scores stand. Great Game and Thanks for playing gentleman, the private round is complete. The public round will continue in the following thread: http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=199427#Post199427 |
||||||||
|
|
|||||||
Allen: Great job on running the public round. I miss you guys when reading the posts |