Buggy python submission (verdict: Runtime Error):
import math
n = input()

def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return
  
  %p1, p2 ?????? s, t, u ????¨????

  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3

  u_x = (t_x - s_x)/2 - (t_y - s_y) * sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * sqrt(3)/2 + (t_y - s_y)/2 + s_y

  koch(n-1, p1_x, s_x, p1_y, s_y)
  print s_x, s_y
  koch(n-1, s_x, u_x, s_y, u_y)
  print u_x, u_y
  koch(n-1, u_x, t_x, u_y, t_y)
  print t_x, t_y
  koch(n-1, t_x, p2_x, t_y, p2_y)

print 0.0, 0.0
koch(n, 0, 100, 0, 0)
print 100.0, 0.0

Fixed submission:
import math
n = int(input())
 
def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return
 
  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3
 
  u_x = (t_x - s_x)/2 - (t_y - s_y) * math.sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * math.sqrt(3)/2 + (t_y - s_y)/2 + s_y
 
  koch(n-1, p1_x, s_x, p1_y, s_y)
  print (s_x, s_y)
  koch(n-1, s_x, u_x, s_y, u_y)
  print (u_x, u_y)
  koch(n-1, u_x, t_x, u_y, t_y)
  print (t_x, t_y)
  koch(n-1, t_x, p2_x, t_y, p2_y)
 
p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0
 
print (p1_x, p1_y)
koch(n, 0, 100, 0, 0)
print (p2_x, p2_y)

Buggy python submission (verdict: Runtime Error):
import math
n = input()

def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return
  
  %p1, p2 ?????? s, t, u ????¨????

  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3

  u_x = (t_x - s_x)/2 - (t_y - s_y) * sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * sqrt(3)/2 + (t_y - s_y)/2 + s_y

  koch(n-1, p1_x, s_x, p1_y, s_y)
  print s_x, s_y
  koch(n-1, s_x, u_x, s_y, u_y)
  print u_x, u_y
  koch(n-1, u_x, t_x, u_y, t_y)
  print t_x, t_y
  koch(n-1, t_x, p2_x, t_y, p2_y)

p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0

print p1_x, p1_y
koch(n, 0, 100, 0, 0)
print p2_x, p2_y

Fixed submission:
import math
n = int(input())
 
def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return
 
  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3
 
  u_x = (t_x - s_x)/2 - (t_y - s_y) * math.sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * math.sqrt(3)/2 + (t_y - s_y)/2 + s_y
 
  koch(n-1, p1_x, s_x, p1_y, s_y)
  print (s_x, s_y)
  koch(n-1, s_x, u_x, s_y, u_y)
  print (u_x, u_y)
  koch(n-1, u_x, t_x, u_y, t_y)
  print (t_x, t_y)
  koch(n-1, t_x, p2_x, t_y, p2_y)
 
p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0
 
print (p1_x, p1_y)
koch(n, 0, 100, 0, 0)
print (p2_x, p2_y)

Buggy python submission (verdict: Runtime Error):
import math
n = input()

def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return

  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3

  u_x = (t_x - s_x)/2 - (t_y - s_y) * sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * sqrt(3)/2 + (t_y - s_y)/2 + s_y

  koch(n-1, p1_x, s_x, p1_y, s_y)
  print s_x, s_y
  koch(n-1, s_x, u_x, s_y, u_y)
  print u_x, u_y
  koch(n-1, u_x, t_x, u_y, t_y)
  print t_x, t_y
  koch(n-1, t_x, p2_x, t_y, p2_y)

p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0

print p1_x, p1_y
koch(n, 0, 100, 0, 0)
print p2_x, p2_y

Fixed submission:
import math
n = int(input())
 
def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return
 
  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3
 
  u_x = (t_x - s_x)/2 - (t_y - s_y) * math.sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * math.sqrt(3)/2 + (t_y - s_y)/2 + s_y
 
  koch(n-1, p1_x, s_x, p1_y, s_y)
  print (s_x, s_y)
  koch(n-1, s_x, u_x, s_y, u_y)
  print (u_x, u_y)
  koch(n-1, u_x, t_x, u_y, t_y)
  print (t_x, t_y)
  koch(n-1, t_x, p2_x, t_y, p2_y)
 
p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0
 
print (p1_x, p1_y)
koch(n, 0, 100, 0, 0)
print (p2_x, p2_y)

Buggy python submission (verdict: Runtime Error):
import math
n = input()

def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return

  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3

  u_x = (t_x - s_x)/2 - (t_y - s_y) * sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * sqrt(3)/2 + (t_y - s_y)/2 + s_y

  koch(n-1, p1_x, s_x, p1_y, s_y)
  print s_x, s_y
  koch(n-1, s_x, u_x, s_y, u_y)
  print u_x, u_y
  koch(n-1, u_x, t_x, u_y, t_y)
  print t_x, t_y
  koch(n-1, t_x, p2_x, t_y, p2_y)

p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0

print p1_x, p1_y
koch(n, 0, 100, 0, 0)
print p2_x, p2_y

Fixed submission:
import math
n = int(input())
 
def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return
 
  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3
 
  u_x = (t_x - s_x)/2 - (t_y - s_y) * math.sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * math.sqrt(3)/2 + (t_y - s_y)/2 + s_y
 
  koch(n-1, p1_x, s_x, p1_y, s_y)
  print (s_x, s_y)
  koch(n-1, s_x, u_x, s_y, u_y)
  print (u_x, u_y)
  koch(n-1, u_x, t_x, u_y, t_y)
  print (t_x, t_y)
  koch(n-1, t_x, p2_x, t_y, p2_y)
 
p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0
 
print (p1_x, p1_y)
koch(n, 0, 100, 0, 0)
print (p2_x, p2_y)

Buggy python submission (verdict: Runtime Error):
import math
n = input()

def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return

  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3

  u_x = (t_x - s_x)/2 - (t_y - s_y) * sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * sqrt(3)/2 + (t_y - s_y)/2 + s_y

  koch(n-1, p1_x, s_x, p1_y, s_y)
  print s_x, s_y
  koch(n-1, s_x, u_x, s_y, u_y)
  print u_x, u_y
  koch(n-1, u_x, t_x, u_y, t_y)
  print t_x, t_y
  koch(n-1, t_x, p2_x, t_y, p2_y)

p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0

print p1_x, p1_y
koch(n, 0, 100, 0, 0)
print p2_x, p2_y

Fixed submission:
import math
n = int(input())
 
def koch(n, p1_x, p2_x, p1_y, p2_y):
  if n == 0:
    return
 
  s_x = (2*p1_x + p2_x) / 3
  s_y = (2*p1_y + p2_y) / 3
  t_x = (p1_x + 2*p2_x) / 3
  t_y = (p1_y + 2*p2_y) / 3
 
  u_x = (t_x - s_x)/2 - (t_y - s_y) * math.sqrt(3)/2 + s_x
  u_y = (t_x - s_x) * math.sqrt(3)/2 + (t_y - s_y)/2 + s_y
 
  koch(n-1, p1_x, s_x, p1_y, s_y)
  print (s_x, s_y)
  koch(n-1, s_x, u_x, s_y, u_y)
  print (u_x, u_y)
  koch(n-1, u_x, t_x, u_y, t_y)
  print (t_x, t_y)
  koch(n-1, t_x, p2_x, t_y, p2_y)
 
p1_x = 0.0
p1_y = 0.0
p2_x = 100.0
p2_y = 0.0
 
print (p1_x, p1_y)
koch(n, 0, 100, 0, 0)
print (p2_x, p2_y)