5 Made changes
source | link

Check, 135 134 132 124 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v
# >10-\)\#     # ?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:R *
o>]=d#^

Input should be passed as a command-line argument. Outputs some unprintables for truthy and only zero bytes for falsey. Always terminates with an IndexError due to the fact that it abuses an interpreter bug.

How does it work?

This code is divided into two segments. The first half turns the input integer into a list of digits, and the second half checks that all of its digits are equal to the first digit (i.e. they are all equal).

It roughly corresponds to the following pseudocode:

  1. Read input and call it i.
  2. Create an empty array and store it in the register. ([r)
  3. If i is 0, go to step 13.
  4. Take the number modulo 10. Call it x.
  5. Prepend x to the register and store it back in the register.
  6. Subtract x from i.
  7. Create a counter, starting at 0.
  8. If i is 0, go to step 12.
  9. Increment the counter.
  10. Decrement i by 10.
  11. Go back to step 8.
  12. Set i to whatever value is now in the counter.
  13. Go back to step 3.
  14. Load the register, which is now an array containing the digits of the input. Call this d.
  15. Get the first element in d and store it in the register.
  16. Create a counter called j, initialized to the length of d.
  17. Decrement j.
  18. If the jth element of d is not equal to the value of the register, crash the program. (We found a digit that is not correct.)
  19. Otherwise, print some random junk !j times. This only prints something if j == 0.
  20. Create an array of length 1 and get the !jth element. This will crash the program if j == 0.
  21. If the program has not yet crashed, j must not yet be zero, so go back to step 17.

Check, 135 134 132 124 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v
# >10-\)\#     # ?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:R *
o>]=d#^

Input should be passed as a command-line argument. Outputs some unprintables for truthy and only zero bytes for falsey. Always terminates with an IndexError due to the fact that it abuses an interpreter bug.

Check, 135 134 132 124 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v
# >10-\)\#     # ?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:R *
o>]=d#^

Input should be passed as a command-line argument. Outputs some unprintables for truthy and only zero bytes for falsey. Always terminates with an IndexError due to the fact that it abuses an interpreter bug.

How does it work?

This code is divided into two segments. The first half turns the input integer into a list of digits, and the second half checks that all of its digits are equal to the first digit (i.e. they are all equal).

It roughly corresponds to the following pseudocode:

  1. Read input and call it i.
  2. Create an empty array and store it in the register. ([r)
  3. If i is 0, go to step 13.
  4. Take the number modulo 10. Call it x.
  5. Prepend x to the register and store it back in the register.
  6. Subtract x from i.
  7. Create a counter, starting at 0.
  8. If i is 0, go to step 12.
  9. Increment the counter.
  10. Decrement i by 10.
  11. Go back to step 8.
  12. Set i to whatever value is now in the counter.
  13. Go back to step 3.
  14. Load the register, which is now an array containing the digits of the input. Call this d.
  15. Get the first element in d and store it in the register.
  16. Create a counter called j, initialized to the length of d.
  17. Decrement j.
  18. If the jth element of d is not equal to the value of the register, crash the program. (We found a digit that is not correct.)
  19. Otherwise, print some random junk !j times. This only prints something if j == 0.
  20. Create an array of length 1 and get the !jth element. This will crash the program if j == 0.
  21. If the program has not yet crashed, j must not yet be zero, so go back to step 17.
4 added 29 characters in body
source | link

Check, 135 134134 132 124 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v      
# >10-\)\# v    <
# >10-\)\##?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:
"1"*R *
o>]=d#^

Input should be passed as a command-line argument. Outputs 1some unprintables for truthy and nothingonly zero bytes for falsey. Always terminates with aan IndexError due to the fact that it abuses an interpreter bug.

Check, 135 134 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v        v    <
# >10-\)\##?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:
"1"*
o>]=d#^

Input should be passed as a command-line argument. Outputs 1 for truthy and nothing for falsey. Always terminates with a IndexError due to the fact that it abuses an interpreter bug.

Check, 135 134 132 124 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v
# >10-\)\#     # ?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:R *
o>]=d#^

Input should be passed as a command-line argument. Outputs some unprintables for truthy and only zero bytes for falsey. Always terminates with an IndexError due to the fact that it abuses an interpreter bug.

3 added 98 characters in body
source | link

Check, 135135 134 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v        v    <
# >10-\)\##?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:> 49]*
"1"*
o>]=d#^

Input should be passed as a command-line argument. Outputs 1 for truthy and nothing for falsey. Always terminates with a IndexError due to the fact that it abuses an interpreter bug.

Check, 135 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v        v    <
# >10-\)\##?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:> 49]*
o>]=d#^

Input should be passed as a command-line argument. Outputs 1 for truthy and nothing for falsey. Always terminates with a IndexError due to the fact that it abuses an interpreter bug.

Check, 135 134 bytes

 [r            #v
#:>10%:]R+r->\#v#?
#v        v    <
# >10-\)\##?
d #             ^ 
 #R:
:>=r,#v
#ddd[=#(:@:@=R-?
d\:!:
"1"*
o>]=d#^

Input should be passed as a command-line argument. Outputs 1 for truthy and nothing for falsey. Always terminates with a IndexError due to the fact that it abuses an interpreter bug.

2 added 98 characters in body
source | link
1
source | link