output_description: Print the number of triples (a,b,c) of positive integers not greater than N
  such that a+b,b+c and c+a are all multiples of K.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
attempt: import sys
  
  data_s = sys.argv
  large_n = int(data_s[1])
  large_k = int(data_s[2])
  
  res_sum = 0
  for num_a in range(1, large_n + 1):
      for num_b in range(1, large_n + 1):
          tmp_ab = num_a + num_b
          if large_k > tmp_ab:
              if large_k % tmp_ab != 0:
                  continue
          elif tmp_ab % large_k != 0:
              continue
  
          for num_c in range(1, large_n + 1):
              tmp_bc = num_b + num_c
              if large_k > tmp_bc:
                  if large_k % tmp_bc != 0:
                      continue
              elif tmp_bc % large_k != 0:
                  continue
  
              tmp_ca = num_c + num_a
              if large_k > tmp_ca:
                  if large_k % tmp_ca != 0:
                      continue
              elif tmp_ca % large_k != 0:
                  continue
  
              res_sum += 1
  
  print(res_sum)
  
problem_description: Statement
  
  You are given integers N and K. Find the number of triples (a,b,c) of positive
  integers not greater than N such that a+b,b+c and c+a are all multiples of K.
  The order of a,b,c does matter, and some of them can be the same.
samples: [{"input": "3 2", "output": "9\n    \n\n(1,1,1),(1,1,3),(1,3,1),(1,3,3),(2,2,2),(3,1,1),(3,1,3),(3,3,1) and (3,3,3)\nsatisfy the condition.\n\n* * *"}, {"input": "5 3", "output": "1\n    \n\n* * *"}, {"input": "31415 9265", "output": "27\n    \n\n* * *"}, {"input": "35897 932", "output": "114191"}]