title: Squared Triangular Number Sum Cubes
signature: squaredTriangularNumberSumCubes(s) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(s, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(s), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          15, 
          -1)
      }");
  
      print("TEST-1...${driver(
          36, 
          3)
      }");
  
      print("TEST-2...${driver(
          39, 
          -1)
      }");
  
      print("TEST-3...${driver(
          43, 
          -1)
      }");
  
      print("TEST-4...${driver(
          75, 
          -1)
      }");
  
      print("TEST-5...${driver(
          49, 
          -1)
      }");
  
      print("TEST-6...${driver(
          56, 
          -1)
      }");
  
      print("TEST-7...${driver(
          14, 
          -1)
      }");
  
      print("TEST-8...${driver(
          62, 
          -1)
      }");
  
      print("TEST-9...${driver(
          97, 
          -1)
      }");
  
      return 0;
  }
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;
  }