Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

added 62 characters in body
Source Link
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. If you like your output printable, the next version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead: here, setting the first value to 4 prints 90 question marks, since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards, and since every cell in the array after the first has a 0 in it the byte which gets printed never changes on account of that 252 - 0 is still 252.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42 (except it can't default to 2)

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55 (except it can't default to 2)

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. If you like your output printable, the next version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead: here, setting the first value to 4 prints 90 question marks, since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards, and since every cell in the array after the first has a 0 in it the byte which gets printed never changes on account of that 252 - 0 is still 252.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. If you like your output printable, the next version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead: here, setting the first value to 4 prints 90 question marks, since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards, and since every cell in the array after the first has a 0 in it the byte which gets printed never changes on account of that 252 - 0 is still 252.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42 (except it can't default to 2)

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55 (except it can't default to 2)

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

Explaned them a bit more
Source Link
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. If you like your output printable, the next version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead: here, setting the first value to 4 prints 90 question marks, since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards, and since every cell in the array after the first has a 0 in it the byte which gets printed never changes on account of that 252 - 0 is still 252.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. If you like your output printable, the next version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead: here, setting the first value to 4 prints 90 question marks, since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. If you like your output printable, the next version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead: here, setting the first value to 4 prints 90 question marks, since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards, and since every cell in the array after the first has a 0 in it the byte which gets printed never changes on account of that 252 - 0 is still 252.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

Explained the question marks
Source Link
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. As I’m on mobile presently, I can’t actually verify that it produces anyIf you like your output at allprintable, but the following variant has plenty visible outputnext version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead (here: here, setting the first value to 4 prints 90 question marks), since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. As I’m on mobile presently, I can’t actually verify that it produces any output at all, but the following variant has plenty visible output:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead (here, setting the first value to 4 prints 90 question marks).

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. If you like your output printable, the next version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s "Turing Tape" I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead: here, setting the first value to 4 prints 90 question marks, since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

Source Link
Unrelated String
  • 23.9k
  • 3
  • 37
  • 61
Loading

AltStyle によって変換されたページ (->オリジナル) /