title: Foobar - Test cases not passing - Disorderly escape
body: <p>0/10 test cases are passing.</p>
  
  <p>Here is the challenge description:</p>
  
  <p>(to keep formatting nice - i put the description in a paste bin)
  Link to challenge description: <a href="https://pastebin.com/UQM4Hip9" rel="nofollow noreferrer">https://pastebin.com/UQM4Hip9</a></p>
  
  <p>Here is my trial code - PYTHON -  (0/10 test cases passed)</p>
  
  <pre><code>from math import factorial
  from collections import Counter
  from fractions import gcd
  
  def cycle_count(c, n):
      cc=factorial(n)
      for a, b in Counter(c).items():
          cc//=(a**b)*factorial(b)
      return cc        
  
  def cycle_partitions(n, i=1):
      yield [n]
      for i in range(i, n//2 + 1):
          for p in cycle_partitions(n-i, i):
              yield [i] + p
  
  def solution(w, h, s):    
      grid=0
      for cpw in cycle_partitions(w):
          for cph in cycle_partitions(h):            
              m=cycle_count(cpw, w)*cycle_count(cph, h)
              grid+=m*(s**sum([sum([gcd(i, j) for i in cpw]) for j in cph]))
  
      return grid//(factorial(w)*factorial(h))
  
  print(solution(2, 2, 2)) #Outputs 7
  </code></pre>
  
  <p>This code works in my python compiler on my computer but not on the foobar challenge??</p>
  
  <p>Am I losing accuracy or something?</p>