output_description: Print the number of unordered pairs (S_i, S_j) where i \neq j and Limak can
  obtain one string from the other.
  
  * * *
input_description: Input is given from Standard Input in the following format.
  
      
      
      N
      S_1
      S_2
      \vdots
      S_N
attempt: import numpy as np
  
  N = int(input())
  
  nums = [float(input()) for _ in range(N)]
  
  two_fives = []
  
  
  for i, num in enumerate(nums):
      int_converted = int(num * (10**9))
  
      two_div_count = 0
      while int_converted % 2 == 0:
          two_div_count += 1
          int_converted //= 2
  
      five_div_count = 0
      while int_converted % 5 == 0:
          five_div_count += 1
          int_converted //= 5
  
      two_fives.append((two_div_count, five_div_count))
  
  
  ok_count = 0
  
  two_five_exists = np.zeros((19, 19), dtype=int)
  
  for i in range(N):
      two_count, five_count = two_fives[i]
      ok_count += two_five_exists[two_count, five_count]
  
      two_pair = 18 - two_count
      five_pair = 18 - five_count
      two_five_exists[two_pair:, five_pair:] += 1
  
  print(ok_count)
  
problem_description: Statement
  
  Limak can repeatedly remove one of the first two characters of a string, for
  example abcxyx \rightarrow acxyx \rightarrow cxyx \rightarrow cyx.
  
  You are given N different strings S_1, S_2, \ldots, S_N. Among N \cdot (N-1) /
  2 pairs (S_i, S_j), in how many pairs could Limak obtain one string from the
  other?
samples: [{"input": "3\n    abcxyx\n    cyx\n    abc", "output": "1\n    \n\nThe only good pair is (abcxyx, cyx).\n\n* * *"}, {"input": "6\n    b\n    a\n    abc\n    c\n    d\n    ab", "output": "5\n    \n\nThere are five good pairs: (b, abc), (a, abc), (abc, c), (b, ab), (a, ab)."}]