Gelöst


Property dispute!
Two neighbors have rectangular plots of land A and B. The surveyors give you the coordinates of each. If they overlap, there is ...

etwa 2 Monate vor

Gelöst


Implement the signum function
The signum function is a common mathematical function, which has the following definition : If x => 0, its value is 1, if x < 0...

etwa 2 Monate vor

Gelöst


Pronounce digits
Given a number num, select the first d decimal places and pronounce the digits (in English). The function returns the pronunciat...

etwa 2 Monate vor

Gelöst


Compute Farey sequences
Problem statement The Farey sequence of order consists of fractions between 0 and 1 expressed in reduced form in increasing or...

etwa 2 Monate vor

Gelöst


ICFP 2024 Programming Contest June 28 thru July 1
This is to announce the annual ICFP programming contest for 2024. The ICFP 2024 homepage link is ICFP 2024 . Registration will...

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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.

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

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

etwa 2 Monate vor | 0 | 1 Lösungsvorschlag

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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

etwa 2 Monate vor

Gelöst


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 Monate vor

Gelöst


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

2 Monate vor

Gelöst


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

2 Monate vor

Mehr laden