1.6 KiB
1.6 KiB
id | challengeType | title |
---|---|---|
5900f3911000cf542c50fea4 | 5 | Problem 37: Truncatable primes |
Description
Instructions
Tests
tests:
- text: <code>truncatablePrimes(8)</code> should return 1986.
testString: assert(truncatablePrimes(8) == 1986, '<code>truncatablePrimes(8)</code> should return 1986.');
- text: <code>truncatablePrimes(9)</code> should return 5123.
testString: assert(truncatablePrimes(9) == 5123, '<code>truncatablePrimes(9)</code> should return 5123.');
- text: <code>truncatablePrimes(10)</code> should return 8920.
testString: assert(truncatablePrimes(10) == 8920, '<code>truncatablePrimes(10)</code> should return 8920.');
- text: <code>truncatablePrimes(11)</code> should return 748317.
testString: assert(truncatablePrimes(11) == 748317, '<code>truncatablePrimes(11)</code> should return 748317.');
Challenge Seed
function truncatablePrimes(n) {
// Good luck!
return n;
}
truncatablePrimes(11);
Solution
// solution required