fork download
  1. while True:
  2. try: t = int(raw_input())
  3. except EOFError: break
  4. x=[]
  5. if (t%(t**.5))==0: n=1
  6. else: n=0
  7. z=int(t**.5)
  8. for i in range(1, z+1):
  9. if t%i==0 :
  10. x.append(i)
  11. print i
  12. i=len(x)-1-n
  13. while i>=0:
  14. print t/x[i]
  15. i-=1
Runtime error #stdin #stdout 0s 4760KB
stdin
255
stdout
Standard output is empty