freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/rosetta-code/sailors-coconuts-and-a-monk...

998 B

title id challengeType videoUrl localeTitle
Sailors, coconuts and a monkey problem 59da22823d04c95919d46269 5

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert(typeof splitCoconuts === "function", "<code>splitCoconuts</code> is a function.");'
  - text: ''
    testString: 'assert(splitCoconuts(5) === 3121, "<code>splitCoconuts(5)</code> should return 3121.");'
  - text: ''
    testString: 'assert(splitCoconuts(6) === 233275, "<code>splitCoconuts(6)</code> should return 233275.");'
  - text: ''
    testString: 'assert(splitCoconuts(7) === 823537, "<code>splitCoconuts(7)</code> should return 823537.");'

Challenge Seed

// noprotect
function splitCoconuts(intSailors) {
  // Good luck!
  return true;
}

Solution

// solution required