问题


Robust Corner Product with Special Value Handling in Arrays
Compute the product of the corner elements of an array (vector or matrix). If any corner element is NaN, return NaN. If any co...

3 days 前 | 0 | 4 个解题者

已解决


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

3 days 前

已解决


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

3 days 前

已解决


Extract diagonal of sparse quadratic form
Consider the matrix A and vector v given by, A=round(sprand(5e3,1e4,1/1e4*100)*100); v=randi(10,width(A),1); Write a rout...

3 days 前

已解决


List the first of three consecutive square-free numbers
The numbers 13, 14, and 15 are consecutive, of course, but they also share the property of being square-free. That is, each numb...

3 days 前

已解决


Express numbers as the sum of a prime, a square, and a cube
While traveling on an interstate highway, I noticed a sign that gave distances to three places. The distances were 3, 8, and 9 m...

3 days 前

已解决


Calculating distance of lightning based on time delay
If we know the time delay between when we see lightning and hear thunder then we can calculate approximate distance(in meters) o...

3 days 前

已解决


finding vector pair with min angle between them
given a matrix with more than one row , compare row vectors of the given matrix and find the pair with the minumum angle between...

3 days 前

已解决


Merge two integers
We want to merge the digits of two integers having the same number of digits to obtain a new integer whose digits are obtained b...

3 days 前

已解决


Count the ways to write 1/n as the sum of two unit fractions
The number 1/2 can be written as 1/3+1/6 and 1/4+1/4, and the number 1/9 can be written as 1/18+1/18, 1/12+1/36, and 1/10+1/90. ...

3 days 前

已解决


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

3 days 前

已解决


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

3 days 前

已解决


List primes of the form xy+z
Consider three consecutive integers , , and . When is the number prime? For example, if or , then the results are 17 and 37, ...

3 days 前

已解决


Extend the digamma function to negative arguments
While solving one of Ramon Villamangca’s problems, I needed the value of , where is the digamma function. However, MATLAB’s fun...

3 days 前

已解决


Identify winnable games of Take a Square
A game has a pile of tokens, and two players alternate in taking a certain number of tokens from the pile, with the constraint t...

3 days 前

已解决


Conditional transpose
You're given two vectors of the same length, x and y, which might be row or a column vectors. Your task is to ensure that y has ...

3 days 前

已解决


Find the closest geyser prime
My wife and I celebrated our honeymoon and our recent anniversary in Yellowstone and Grand Teton National Parks. After returning...

3 days 前

已解决


Delete some elements in the natural set and find the sum of the first n terms
Delete the number (except 0,1) with a complete square number from the natural set of numbers, form a new set of numbers, find th...

3 days 前

已解决


List the partitions of an integer
Several Cody problems deal with partitions of an integer, or the ways an integer can be written as the sum of positive numbers—...

3 days 前

已解决


Find the Nth number in the 8-sequence
Find the Nth number in the 8-sequence. 8, 16, 24, 32, 48, 56, 64, 72, 88, ... Hint: Refer test suites

3 days 前

已解决


Find the Nth number in the 7-sequence
Find the Nth number in the 7-sequence. 7, 14, 21, 28, 35, 42, 49, 56, 63, 77, 84, ... Hint: Refer test suites

3 days 前

已解决


Find the Nth number in the 6-sequence
Find the Nth number in the 6-sequence. 6, 12, 18, 24, 36, 42, 48, 54, 66, ... Hint: Refer test suites

3 days 前

已解决


Find the Nth number in the 5-sequence
Find the Nth number in the 5-sequence. 5, 15, 25, 35, 45, 55, ... Hint: Refer test suites

3 days 前

已解决


Find the Nth number in the 4-sequence
Find the Nth number in the 4-sequence. 4, 8, 12, 16, 24, 28, 32, 36, 44 ... Hint: Refer test suites

3 days 前

已解决


Find the Nth number in the 3-sequence
Find the Nth number in the 3-sequence. 3, 6, 9, 12, 15, 18, 21, 24, 27, 33 ... Hint: Refer test suites

3 days 前

已解决


Find the Nth number in the 2-sequence.
Find the Nth number in the sequence. 2, 4, 6, 8, 12, 14, 16, 18, 22, ... Hint: Refer test suites

3 days 前

已解决


2x2 binning of a large sparse matrix
Consider the 20000 x 20000 sparse matrix, A=round(sprand(2e4,2e4,1/1e4*100)*1000); The task is to divide this matrix into 2x...

4 days 前

已解决


Build a block Toeplitz matrix
A symmetric block Toeplitz matrix has the form, where the are compatibly-sized matrices. Write a routi...

4 days 前

已解决


Identify points inside a Reuleaux triangle
Write a function to identify points that lie in or on a Realeaux triangle, which is a curve of constant width. The input to the ...

4 days 前

已解决


Express integers in negabinary
Negabinary numbers are written in base -2. For example, the negabinary number 11010 is , or 6 in base 10. In a similar way, -3 i...

4 days 前

加载更多