Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
4 added 696 characters in body
source | link

Pyth, 37 33 29 28 bytes

The code contains an unprintable character, so here is an xxd hexdump.

00000000: 737d 5173 4d5e 733c 5252 6336 2e22 6174  s}QsM^s<RRc6."at
00000010: 14d0 69ba 76f1 ac59 6422 346c            ..i.v..Yd"4l

Try it online.

Extremely Astronomically inefficient. The time and space complexity is O(16n) O(24n).

Explanation

First, a Q is implicitly appended.

s}QsM^s<RRc6."…"4lQ     Implicit: Q = input
            ."…"        Generate "logsincostanlnee"
          c6            Split in 6 parts: ["log", "sin", "cos", "tan", "ln", "ee"]
         R      4       For each n from 0 to 3
       <R               Take the first n chars from each string
      s                 Flatten the results
                 lQ     Get length of input
     ^                  Take that Cartesian power of the list
   sM                   Join each resulting list
 }Q                     Check if the input is found
s                       Cast to integer

Pyth, 37 33 29 28 bytes

The code contains an unprintable character, so here is an xxd hexdump.

00000000: 737d 5173 4d5e 733c 5252 6336 2e22 6174  s}QsM^s<RRc6."at
00000010: 14d0 69ba 76f1 ac59 6422 346c            ..i.v..Yd"4l

Try it online.

Extremely Astronomically inefficient. The time and space complexity is O(16n) O(24n).

Pyth, 37 33 29 28 bytes

The code contains an unprintable character, so here is an xxd hexdump.

00000000: 737d 5173 4d5e 733c 5252 6336 2e22 6174  s}QsM^s<RRc6."at
00000010: 14d0 69ba 76f1 ac59 6422 346c            ..i.v..Yd"4l

Try it online.

Extremely Astronomically inefficient. The time and space complexity is O(16n) O(24n).

Explanation

First, a Q is implicitly appended.

s}QsM^s<RRc6."…"4lQ     Implicit: Q = input
            ."…"        Generate "logsincostanlnee"
          c6            Split in 6 parts: ["log", "sin", "cos", "tan", "ln", "ee"]
         R      4       For each n from 0 to 3
       <R               Take the first n chars from each string
      s                 Flatten the results
                 lQ     Get length of input
     ^                  Take that Cartesian power of the list
   sM                   Join each resulting list
 }Q                     Check if the input is found
s                       Cast to integer
3 added 31 characters in body
source | link

Pyth, 37 33 2929 28 bytes

The code contains an unprintable character, so here is an xxd hexdump.

00000000: 737d 5173 4d5e 2b6b 732e733c 5f4d5252 6336 2e22 6174  s}QsM^+ks._Mc6QsM^s<RRc6.""at
00000010: 6174 14d0 69ba 76f1 ac59 6422 6c346c         at   ..i.v..Yd"lYd"4l

Try it online.Try it online.

ExtremelyExtremely Astronomically inefficient. The time and space complexity is O(16n) O(24n).

Pyth, 37 33 29 bytes

The code contains an unprintable character, so here is an xxd hexdump.

00000000: 737d 5173 4d5e 2b6b 732e 5f4d 6336 2e22  s}QsM^+ks._Mc6."
00000010: 6174 14d0 69ba 76f1 ac59 6422 6c         at..i.v..Yd"l

Try it online.

Extremely inefficient.

Pyth, 37 33 29 28 bytes

The code contains an unprintable character, so here is an xxd hexdump.

00000000: 737d 5173 4d5e 733c 5252 6336 2e22 6174  s}QsM^s<RRc6."at
00000010: 14d0 69ba 76f1 ac59 6422 346c            ..i.v..Yd"4l

Try it online.

Extremely Astronomically inefficient. The time and space complexity is O(16n) O(24n).

2 added 2 characters in body
source | link

Pyth, 3637 3233 29 bytes

The code contains an unprintable character, so here is an xxd hexdump.

00000000: 737d 5173 4d5e 2b6b 732e 5f4d 6336 2e22  s}QsM^+ks._Mc6"logsincostanlnee"l_Mc6."
00000010: 6174 14d0 69ba 76f1 ac59 6422 6c         at..i.v..Yd"l

Try it online.Try it online.

Extremely inefficient.

Pyth, 36 32 bytes

}QsM^+ks._Mc6"logsincostanlnee"l

Try it online.

Extremely inefficient.

Pyth, 37 33 29 bytes

The code contains an unprintable character, so here is an xxd hexdump.

00000000: 737d 5173 4d5e 2b6b 732e 5f4d 6336 2e22  s}QsM^+ks._Mc6."
00000010: 6174 14d0 69ba 76f1 ac59 6422 6c         at..i.v..Yd"l

Try it online.

Extremely inefficient.

1
source | link