title: Squared Triangular Number Sum Cubes
signature: squaredTriangularNumberSumCubes :: Integer -> Integer
  squaredTriangularNumberSumCubes s = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Integer -> Integer -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Integer -> String
  driver s expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME s) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (15) (-1) )
  
      printf "TEST-1...%s\n" (driver (36) (3) )
  
      printf "TEST-2...%s\n" (driver (39) (-1) )
  
      printf "TEST-3...%s\n" (driver (43) (-1) )
  
      printf "TEST-4...%s\n" (driver (75) (-1) )
  
      printf "TEST-5...%s\n" (driver (49) (-1) )
  
      printf "TEST-6...%s\n" (driver (56) (-1) )
  
      printf "TEST-7...%s\n" (driver (14) (-1) )
  
      printf "TEST-8...%s\n" (driver (62) (-1) )
  
      printf "TEST-9...%s\n" (driver (97) (-1) )
  
source_py: def squared_triangular_number_sum_cubes(s):
      _sum = 0
      n = 1
      while (_sum < s):
          _sum += ((n * n) * n)
          n += 1
      n -= 1
      if (_sum == s):
          return n
      return (- 1)
source_cpp: int squared_triangular_number_sum_cubes(int s) {
    int sum = 0;
    for ( int n = 1;
    sum < s;
    n ++ ) {
      sum += n * n * n;
      if ( sum == s ) return n;
    }
    return - 1;
  }