Buggy python submission (verdict: Runtime Error):
def fact(num):
  ret=[]
  if num==2:
    ret=[2]
    return ret
  elif num==3:
    ret=[2,3]
    return ret
  while 1:
    for i in range(2,int(num**0.5)+1):
      if num%i==0:
        ret.append(i)
        num=num%i
        break

n=int(input())
ans=fact(n)
print('{}: {}'.format(n,' '.join(map(str,ans)))


Fixed submission:
def prime(num):
    if num==1:
        return False
    elif num==2 or num==3:
        return True
    else:
        for i in range(2,int(num**0.5)+1):
            if num%i==0:
                return False
        else:
            return True

n=int(input())
tmp=n
plist=[]
if prime(n):
    print('{}: {}'.format(n,n))
else:
    while 1:
        for i in range(2,tmp+1):
            if tmp%i==0:
                plist.append(i)
                tmp=tmp//i
                break
        else:
            break
    print('{}: {}'.format(n,' '.join(map(str,plist))))

Buggy python submission (verdict: Time Limit Exceeded):
def fact(num):
  ret=[]
  if num==2:
    ret=[2]
    return ret
  elif num==3:
    ret=[2,3]
    return ret
  while 1:
    for i in range(2,int(num**0.5)+1):
      if num%i==0:
        ret.append(i)
        num=num%i
        break
 
n=int(input())
ans=fact(n)
print('{}: {}'.format(n,' '.join(map(str,ans))))


Fixed submission:
def prime(num):
    if num==1:
        return False
    elif num==2 or num==3:
        return True
    else:
        for i in range(2,int(num**0.5)+1):
            if num%i==0:
                return False
        else:
            return True

n=int(input())
tmp=n
plist=[]
if prime(n):
    print('{}: {}'.format(n,n))
else:
    while 1:
        for i in range(2,tmp+1):
            if tmp%i==0:
                plist.append(i)
                tmp=tmp//i
                break
        else:
            break
    print('{}: {}'.format(n,' '.join(map(str,plist))))

Buggy python submission (verdict: Runtime Error):
def fact(num):
  ret=[]
  if num==2:
    ret=[2]
    return ret
  elif num==3:
    ret=[2,3]
    return ret
  while 1:
    for i in range(2,int(num**0.5)+1):
      if num%i==0:
        ret.append(i)
        num=num%i
        break
    else:
      break
  
n=int(input())
ans=fact(n)
print('{}: {}'.format(n,' '.join(map(str,ans))))


Fixed submission:
def prime(num):
    if num==1:
        return False
    elif num==2 or num==3:
        return True
    else:
        for i in range(2,int(num**0.5)+1):
            if num%i==0:
                return False
        else:
            return True

n=int(input())
tmp=n
plist=[]
if prime(n):
    print('{}: {}'.format(n,n))
else:
    while 1:
        for i in range(2,tmp+1):
            if tmp%i==0:
                plist.append(i)
                tmp=tmp//i
                break
        else:
            break
    print('{}: {}'.format(n,' '.join(map(str,plist))))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
num=n
if n==2:
  prime=[2]
elif n==3:
  prime=[2,3]
else:
  prime=[]
  for _ in range(40):
    for i in range(2,n+1):
      if n%i==0:
        prime.append(i)
        n=n//i
        break
    else:
      break
if len(prime)==0:
  prime=[num]
print('{}: {}'.format(num,' '.join(map(str,prime))))


Fixed submission:
def prime(num):
    if num==1:
        return False
    elif num==2 or num==3:
        return True
    else:
        for i in range(2,int(num**0.5)+1):
            if num%i==0:
                return False
        else:
            return True

n=int(input())
tmp=n
plist=[]
if prime(n):
    print('{}: {}'.format(n,n))
else:
    while 1:
        for i in range(2,tmp+1):
            if tmp%i==0:
                plist.append(i)
                tmp=tmp//i
                break
        else:
            break
    print('{}: {}'.format(n,' '.join(map(str,plist))))