Skip to main content
Commonmark migration
Source Link

#Answer 5 - SOGL 0.8.2, 9 b∫I:b;?t"Gw~) %n=int(input()) %i=1 %div=[] %while (i<=n): % if n % i == 0: % div.append(i) % i+=1 %print(div)Rḍ⁸T”

Answer 5 - SOGL 0.8.2, 9

b∫I:b;\?t"Gw\~)
%n=int(input())
%i=1
%div=[]
%while (i<=n):
%    if n % i == 0:
%        div.append(i)
%    i+=1
%print(div)Rḍ⁸T”

Explanation:

b∫              repeat input times                [0]
  I             increment (the loop is 0-based)   [1]
   :b           duplicate                         [1, 1]
     ;          put the input one under the stack [1, 114, 1]
      \?        if divides                        [1, 1]
        t        output                           [1, 1]
         "...”   push that long string            [1, 1, "Gw\~...Rḍ⁸T"]

Note: the interpreter currently needs the \ns be replaced with in order to not count it as input, but the parser itself considers both interchangable.

#Answer 5 - SOGL 0.8.2, 9 b∫I:b;?t"Gw~) %n=int(input()) %i=1 %div=[] %while (i<=n): % if n % i == 0: % div.append(i) % i+=1 %print(div)Rḍ⁸T”

Explanation:

b∫              repeat input times                [0]
  I             increment (the loop is 0-based)   [1]
   :b           duplicate                         [1, 1]
     ;          put the input one under the stack [1, 114, 1]
      \?        if divides                        [1, 1]
        t        output                           [1, 1]
         "...”   push that long string            [1, 1, "Gw\~...Rḍ⁸T"]

Note: the interpreter currently needs the \ns be replaced with in order to not count it as input, but the parser itself considers both interchangable.

Answer 5 - SOGL 0.8.2, 9

b∫I:b;\?t"Gw\~)
%n=int(input())
%i=1
%div=[]
%while (i<=n):
%    if n % i == 0:
%        div.append(i)
%    i+=1
%print(div)Rḍ⁸T”

Explanation:

b∫              repeat input times                [0]
  I             increment (the loop is 0-based)   [1]
   :b           duplicate                         [1, 1]
     ;          put the input one under the stack [1, 114, 1]
      \?        if divides                        [1, 1]
        t        output                           [1, 1]
         "...”   push that long string            [1, 1, "Gw\~...Rḍ⁸T"]

Note: the interpreter currently needs the \ns be replaced with in order to not count it as input, but the parser itself considers both interchangable.

added 686 characters in body
Source Link
dzaima
  • 20.3k
  • 2
  • 41
  • 75

#Answer 5 - SOGL 0.8.2, 9 b∫I:b;?t"Gw~)¶%n=int %n=int(input())¶%i=1¶%div=[]¶%while %i=1 %div=[] %while (i<=n):¶% % if n % i == 0:¶% % div.append(i)¶% i+=1¶%print % i+=1 %print(div)Rḍ⁸T”

Explanation:

b∫              repeat input times                [0]
  I             increment (the loop is 0-based)   [1]
   :b           duplicate                         [1, 1]
     ;          put the input one under the stack [1, 114, 1]
      \?        if divides                        [1, 1]
        t        output                           [1, 1]
         "...”   push that long string            [1, 1, "Gw\~...Rḍ⁸T"]

Note: the interpreter currently needs the \ns be replaced with in order to not count it as input, but the parser itself considers both interchangable.

#Answer 5 - SOGL 0.8.2, 9 b∫I:b;?t"Gw~)¶%n=int(input())¶%i=1¶%div=[]¶%while (i<=n):¶% if n % i == 0:¶% div.append(i)¶% i+=1¶%print(div)Rḍ⁸T”

#Answer 5 - SOGL 0.8.2, 9 b∫I:b;?t"Gw~) %n=int(input()) %i=1 %div=[] %while (i<=n): % if n % i == 0: % div.append(i) % i+=1 %print(div)Rḍ⁸T”

Explanation:

b∫              repeat input times                [0]
  I             increment (the loop is 0-based)   [1]
   :b           duplicate                         [1, 1]
     ;          put the input one under the stack [1, 114, 1]
      \?        if divides                        [1, 1]
        t        output                           [1, 1]
         "...”   push that long string            [1, 1, "Gw\~...Rḍ⁸T"]

Note: the interpreter currently needs the \ns be replaced with in order to not count it as input, but the parser itself considers both interchangable.

Source Link
dzaima
  • 20.3k
  • 2
  • 41
  • 75

#Answer 5 - SOGL 0.8.2, 9 b∫I:b;?t"Gw~)¶%n=int(input())¶%i=1¶%div=[]¶%while (i<=n):¶% if n % i == 0:¶% div.append(i)¶% i+=1¶%print(div)Rḍ⁸T”