0 Members and 2 Guests are viewing this topic.
N = 14D = 21 + 4 = 54 + 5 = 95 + 9 = 14
N = 197D = 31 + 9 + 7 = 179 + 7 + 17 = 337 + 17 + 33 = 5717 + 33 + 57 = 10733 + 57 + 107 = 197
N = 1337D = 41 + 3 + 3 + 7 = 143 + 3 + 7 + 14 = 273 + 7 + 14 + 27 = 517 + 14 + 27 + 51 = 9914 + 27 + 51 + 99 = 19127 + 51 + 99 + 191 = 36851 + 99 + 191 + 368 = 70999 + 191 + 368 + 709 = 1367
Can the output for "false" be an infinite stream of "false"-s?And can the output for "true" be an infinite stream of "false"-s? with a "true" somewhere in the middle? Other than that i'm about done
Quote from: c4ooo on June 29, 2015, 06:30:06 pmCan the output for "false" be an infinite stream of "false"-s?And can the output for "true" be an infinite stream of "false"-s? with a "true" somewhere in the middle? Other than that i'm about done No. The stream cannot be infinite. But it must somehow be unique for true and false, and distinguishable.
Oh, and it must be the same for all truthy and falsy results.
Quote from: JWinslow23 on June 29, 2015, 07:54:06 pmQuote from: c4ooo on June 29, 2015, 06:30:06 pmCan the output for "false" be an infinite stream of "false"-s?And can the output for "true" be an infinite stream of "false"-s? with a "true" somewhere in the middle? Other than that i'm about done No. The stream cannot be infinite. But it must somehow be unique for true and false, and distinguishable.Actually my conditional exit turned out to be smaller then an infinite one Quote from: JWinslow23 on June 29, 2015, 07:54:06 pmOh, and it must be the same for all truthy and falsy results.However this part may trip me up about 20 bytes Edit: I presume the only input provided is the integer to be tested, 'N' and that 'D' is not provided. Am i right?
Entry submitted, 217 bytes in java. And also JWinslow please count compiled programs (axe included) in source size. @pimathbrainiac and I now both agree that all compiled languages should be counted in source size.Edit: do you have a Programing Puzzles & Code Golf acount on stack overflow? If not can i cross post the question?
Are the following acceptable truthy and falsy results:2 and 0no error and error1 and no outputIs there a minimum input value up through which the program must return correct results?
Lua, 152JS, 112.(counted both with the "function K(n)" header)
And the minimum (also for determining them in the first place; 1 digit numbers are trivially Keith numbers) is 10. Which is not a Keith number (1+0, 0+1, 1+1, 1+2, 2+3, 3+5, 5+8...).
Quote from: JWinslow23 on June 30, 2015, 11:31:12 pmAnd the minimum (also for determining them in the first place; 1 digit numbers are trivially Keith numbers) is 10. Which is not a Keith number (1+0, 0+1, 1+1, 1+2, 2+3, 3+5, 5+8...).I meant is there a required point at least through which the program must behave correctly? Does an entry have to work for all inputs up to 100? 1000? 1000000?