Solved


Easy Sequences 83: Digits of Powers of 3
This problem is a simpler version of 'Easy Sequences 82: Digits of Powers of 2'. Given integers and , we are asked to return th...

3 years ago

Solved


Easy Sequences 57: "Pretty-gorean" Triangles?
A positive integer is called a regular number, if and only if there exist a non-negative integer , such that . For some reason...

3 years ago

Solved


About jokes (and compression)
An argument can be made about jokes. The shorter they are, the funnier. Further explained here: https://en.wikipedia.org/wiki/Hu...

3 years ago

Solved


Counting Permutations
In the permutations of the numbers 1 to n, count the number of permutations in which exactly m elements are greater than the pre...

3 years ago

Solved


Determine flows of given probability using empirical frequency analysis
Write a function that takes as input observations of peak streamflow and exceedance probabilities expressed as percentages an...

3 years ago

Solved


Extract the prime numbers
Given a list of elements, extract the prime numbers from that array.

3 years ago

Solved


Find alternating sum
Given an array, find alternating sum i.e. – y = x (1) – x (2) + x (3) – x (4) + x (5) - …

3 years ago

Solved


Play with array Min-Max
An array is provided. For example, a= [ 2,1,11,4,5,13] Create an array from a like this way, out= [ 1,11,2,13,4,5] ➢ 1st take...

3 years ago

Solved


Given a matrix X, manipulate it accordingly
Given a matrix X, 1st add a column to the matrix whose elements are the summation of each rows. Then add a row to the matrix who...

3 years ago

Solved


An array is given. Find the unique elements of the array. [keep the sequence unchanged]
An array is given. Find the unique elements of the array. [keep the sequence unchanged] For example if input x=[2 ,4 , 9 ,2 ,...

3 years ago

Solved


An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks received by the students?
An array is given that contains the marks received by a group of students in their class test. Find out the highest 3 marks rec...

3 years ago

Solved


Easy Sequences 91: Generalized McCarthy-91 Recursive Function
The McCarthy 91 function is a recursive function, defined by the computer scientist John McCarthy as a test case for formal veri...

3 years ago

Solved


Hermite Polynomials
Problem 1304 deals with Hermite polynomial of the physicist's type. In this problem, Return the n-th Hermite polynomial of the ...

3 years ago

Solved


Easy Sequences 84: Digits of Powers of 5
OEIS sequence #A008566, deals with the following series: This sequence is the digits of powers of 5 listed si...

3 years ago

Solved


Compute the area of the shoemaker’s knife
A shape resembling a shoemaker’s knife is constructed from a semicircle with diameter with two semicircular “bites” of diameter...

3 years ago

Solved


Integer vector optimal lossless deduplication
You're given an integer vector A, a Min scalar and a Max scalar. You can assume all elements in A are in [Min,Max] range, and nu...

3 years ago

Solved


Repeatitive Summation
Given numeric vectors x, a and b, perform the following operation - a represents a vector of numbers and b represents a vector ...

3 years ago

Solved


Find patterns in subprime Fibonacci sequences
Lots of Cody problems involve Fibonacci and Collatz sequences. Fibonacci sequences start with two numbers, and later terms are c...

3 years ago

Solved


Easy Sequences 12: 50th Prime
Write a function that outputs the th prime after a given number . For example, the th prime after is . NOTE: If itself is pr...

3 years ago

Solved


Leave a thumb-up to pass
Just leave a Like, and a comment if you wish. Then wait, and submit.

3 years ago

Solved


Easy Sequences 88: Double Summation of a Combinatorial Function
Given two positive integers and , , we define the function as the sum of the reciprocals of the products of all combinations o...

3 years ago

Solved


Compute steady drawdown in a confined aquifer
A well extracting water from a confined aquifer will lower the piezometric head and create a cone of depression. In steady state...

3 years ago

Solved


Compute the Tetris sequence
In the Tetris sequence, which starts with a 1, the next term is the smallest positive integer not already in the sequence that h...

3 years ago

Solved


Determine if input is a Harshad number
In mathematics a harshad number (or Niven number) in a given number base is an integer that is divisible by the sum of its digit...

3 years ago

Solved


Locate image wells
A mathematical model of wells pumping groundwater near a boundary can be constructed using the method of images, which is also u...

3 years ago

Solved


Compute the largest number with a given integer complexity
Cody Problems 42831 and 42834 ask us to compute integer complexity, the smallest number of 1s needed to construct a number with ...

3 years ago

Solved


JannaT is Loved By Me
JannaT was sTarTed loved by me and that time was in 2020. A year when JannaT will starT loving me when the year divided from th...

3 years ago

Solved


Solve an equation involving primes and fractions
Write a function to find pairs of primes and satisfying the equation where is an integer. The function should take a numbe...

3 years ago

Solved


Easy Sequences 81: Fibonacci Radicals
The radical of a positive integer is defined as the product of the distinct prime numbers dividing . For example, the distinct ...

3 years ago

Solved


Design a well field in an infinite aquifer
A well field provides water for a community. The design of a well field involves a goal to meet a specified service demand (i.e...

3 years ago

Load more