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 ...

2 years ago | 0 | 3 solvers

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...

2 years 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...

2 years 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 ...

2 years 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...

2 years 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...

2 years 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...

2 years 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...

2 years 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...

2 years 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...

2 years 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 ...

2 years 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...

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years 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...

2 years 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...

2 years 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 ...

2 years ago

Solved


Determine whether a property description closes
The arrival of summer makes think back to the summers I spent working for my father’s engineering firm. For the first several s...

2 years ago

Solved


Determine the mass of a bat which strikes a ball
Given the speed, the force of the impact and the length of the trajectory calculate the mass of the bat which the player holds p...

2 years ago

Solved


Area of right triangle
Given a hypotenuse and a leg , calculate the area of right triangle.

2 years ago

Solved


Determine the potential energy in a springrope which hangs over from a bridge
The task is to figure out the energy a person with mass has when hung on a rope over a bridge when given the length from the sus...

2 years ago

Solved


Travel a path
In Cody Problem 60251, minnolina asks us to determine the end point given a string indicating unit movements forward, backward, ...

2 years ago

Solved


Add non-triangular numbers
The nth triangular number is the sum of the first n positive integers. The sequence of triangular numbers starts 1, 3, 6, 10, 15...

2 years ago

Solved


Compute the area of a lune
Write a function to compute the area of the shaded moon-shaped region in the figure below—that is, the area of a smaller circle ...

2 years ago

Solved


Remove Unique Elements
Given a list of integers, we want to keep only the non-unique elements in this list. To do this, we need to remove all the uniqu...

2 years ago

Solved


Limiting Element Occurrences
You are given a list 'v' of numbers. This list may contain repeated numbers. Your objective is to create a new list that maintai...

2 years ago

Solved


Maximizing Stock Profit
As a stock exchange broker focusing on a single transaction, your goal is to maximize profit by buying a stock at a low price an...

2 years ago

Load more