Skip to main content
-9 bytes
Source Link
bsoelch
  • 6k
  • 1
  • 9
  • 62

Python, 9887 bytes, score 9 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters

-4 bytes, thanks to noodle man
-9 bytes, thanks to l4m2


def f(s):print(f"exec({'+'.join('chr('+'+'.join(['1']*ord'+'+1'*ord(c))+')'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()hr1+

Attempt This Online!

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 85 bytes, score 11

def f(s):print(f"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()hr0b1+

Python, 98 bytes, score 9 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters

-4 bytes, thanks to noodle man


def f(s):print(f"exec({'+'.join('chr('+'+'.join(['1']*ord(c))+')'for c in f'print({repr(s)})')})")

encodes string using exc()hr1+

Attempt This Online!

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 85 bytes, score 11

def f(s):print(f"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()hr0b1+

Python, 87 bytes, score 9 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters

-4 bytes, thanks to noodle man
-9 bytes, thanks to l4m2


def f(s):print(f"exec({'+'.join('chr('+'+1'*ord(c)+')'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()hr1+

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 85 bytes, score 11

def f(s):print(f"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()hr0b1+

-4 bytes
Source Link
bsoelch
  • 6k
  • 1
  • 9
  • 62

Python, 10298 bytes, score 9 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters

-4 bytes, thanks to noodle man


def f(s):print(end=f"execf"exec({'+'.join('chr('+'+'.join(['1']*ord(c))+')'for c in f'print({repr(s)})')})")

encodes string using exc()hr1+

Attempt This Online!Attempt This Online!

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 8985 bytes, score 11

def f(s):print(end=f"execf"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!Attempt This Online!

encodes string using exc()hr0b1+

Python, 102 bytes, score 9 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters


def f(s):print(end=f"exec({'+'.join('chr('+'+'.join(['1']*ord(c))+')'for c in f'print({repr(s)})')})")

encodes string using exc()hr1+

Attempt This Online!

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 89 bytes, score 11

def f(s):print(end=f"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()hr0b1+

Python, 98 bytes, score 9 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters

-4 bytes, thanks to noodle man


def f(s):print(f"exec({'+'.join('chr('+'+'.join(['1']*ord(c))+')'for c in f'print({repr(s)})')})")

encodes string using exc()hr1+

Attempt This Online!

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 85 bytes, score 11

def f(s):print(f"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()hr0b1+

c appears in both exec and chr
Source Link
bsoelch
  • 6k
  • 1
  • 9
  • 62

Python, 102 bytes, score 109 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters


def f(s):print(end=f"exec({'+'.join('chr('+'+'.join(['1']*ord(c))+')'for c in f'print({repr(s)})')})")

encodes string using exc()chr1+hr1+

Attempt This Online!

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 89 bytes, score 1211

def f(s):print(end=f"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()chr0b1+hr0b1+

Python, 102 bytes, score 10 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters


def f(s):print(end=f"exec({'+'.join('chr('+'+'.join(['1']*ord(c))+')'for c in f'print({repr(s)})')})")

encodes string using exc()chr1+

Attempt This Online!

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 89 bytes, score 12

def f(s):print(end=f"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()chr0b1+

Python, 102 bytes, score 9 (ASCII only code)

See Unrelated String's solution for a lower score by using non-ascii characters


def f(s):print(end=f"exec({'+'.join('chr('+'+'.join(['1']*ord(c))+')'for c in f'print({repr(s)})')})")

encodes string using exc()hr1+

Attempt This Online!

Explanation

Encodes string as exec(chr(1+...+1)+chr(1+1+...)+...)

The executed code is print(S) with S being the string-representation of the input. The characters in the string are represented as sums of 1's


Python, 89 bytes, score 11

def f(s):print(end=f"exec({'+'.join(f'chr(0b{ord(c):b})'for c in f'print({repr(s)})')})")

Attempt This Online!

encodes string using exc()hr0b1+

reduce score by 2
Source Link
bsoelch
  • 6k
  • 1
  • 9
  • 62
Loading
Source Link
bsoelch
  • 6k
  • 1
  • 9
  • 62
Loading