Solved


Compute a sum
Write a function to compute the following sum Although a solution is available for general values of the coefficients, the co...

6 months ago

Solved


Generate a point cloud on an equilateral triangle 2
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

6 months ago

Solved


Generate a point cloud on an equilateral triangle 1
The input is the iteration parameter H. The output is a point cloud W involving N points. W is N uniformly distributed points ...

6 months ago

Solved


Rotation Matrix to Euler Angles
Given a rotation matrix, generate the Euler Angles as output [phi,theta,psi]. [phi is a rotation around X-axis, theta is rotatio...

6 months ago

Solved


Exhaust all possible logical vectors
Input a length argument and list all possible logical vectors of that length. My solution is of size 29. Can you find an even s...

6 months ago

Solved


No of squares in a grid
given a m*n grid calculate the no of possible squares & rectangles on that grid. output: y=[no of rectangles , no of sqa...

6 months ago

Solved


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

6 months ago

Solved


Remove Adjacent Pairs
Given an array of integers where adjacent elements may be identical, your task is to remove these adjacent pairs. If removing on...

6 months ago

Solved


switch base, again
The test suite for problem 60436 contained some syntax errors that made the problem unsolvable, so I took the liberty of fixing ...

6 months ago

Solved


switch base
Input an integer, switch its base. Input is a string, so is output.

6 months ago

Problem


switch base, again
The test suite for problem 60436 contained some syntax errors that made the problem unsolvable, so I took the liberty of fixing ...

6 months ago | 0 | 1 solver

Solved


Is this function available?
Sometimes it is difficult to remember which functions are not allowed on the Cody platform. Given a function as a string, return...

6 months ago

Solved


Numbered lottery balls into cells
You are running a lottery, and have a number of different balls numbered 1 to N. Your job is to figure out how many different w...

6 months ago

Solved


Put m balls into n boxes
Can you find all the cases where, if I put 3 balls into 2 boxes the case is 1 1 1 1 1 2 1 ...

6 months ago

Solved


Classify numbers as abundant, deficient, or perfect
A number is perfect if the sum of its proper divisors (i.e., divisors excluding the number itself) is equal to itself. For examp...

6 months ago

Solved


Calculating the Union Area of Overlapping Rectangles
Calculate the area covered by a union of multiple rectangles. Each rectangle is represented by 4 integers: the first two integer...

6 months ago

Solved


Reversing Maximal Ascending Subsequences
Create and return a new array that contains the same elements as the input array, but with the elements within each strictly inc...

6 months ago

Solved


Largest Rectangle Area in a Histogram
Given a histogram represented by an array of integers, e.g., [2, 1, 4, 5, 1, 3, 3] : find the maximum area of a rectangle tha...

6 months ago

Solved


Secret Message and Acrostic
One of the simplest ways to hide a message involves utilizing uppercase letters. Given a text, collect all uppercase letters in...

6 months ago

Solved


Alert a city about a spill
Problem statement Cody Problem 54750 involved determining the length of a stream affected by a spill of a contaminant. Any muni...

6 months ago

Solved


Compute a sequence with the whyphi sieve
A few problems on Cody involve sieving. For example, Cody Problem 45367 involves the famous Sieve of Eratosthenes. CP 50811uses ...

6 months ago

Solved


Find primes and integers that solve an equation
Write a function to find all primes and non-negative integers that solve the equation where is an integer. If there are no...

6 months ago

Solved


Cos x
Retorne o cosseno de x, onde x está em radianos

6 months ago

Solved


Número de elementos do array
Retorne o número de elementos de um array

6 months ago

Solved


Seno de x
Calcule o seno de x, onde x está em radianos

6 months ago

Solved


Valor absoluto de x
Dado uma entrada x, retornar o seu valor absoluto

6 months ago

Solved


Eleve ao cubo!
dado uma entrada x, encontre o seu cubo

6 months ago

Solved


List the smallest numbers with n distinct prime factors
The author of a book I am reading asked a mathematician what it feels like to be sixty. He wrote He replied, “Sixty, sandwiched...

6 months ago

Solved


Compute the area of a Q
A figure resembling a Q (as in “quadrature”) is constructed in the following way: A right triangle is drawn with the left vertex...

6 months ago

Solved


Family Savings Analysis
Given the bank accounts of individuals defined by a list of tuples containing the last name, first name, and savings: accounts ...

6 months ago

Load more