문제를 풀었습니다


Polynomial Evaluation
Create a routine that takes a list of coefficients of a polynomial in order of increasing powers of x; together with a value of ...

대략 10년 전

문제를 풀었습니다


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

대략 10년 전

문제를 풀었습니다


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

대략 10년 전

문제를 풀었습니다


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

대략 10년 전

문제를 풀었습니다


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

대략 10년 전

문제를 풀었습니다


DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

대략 10년 전

문제를 풀었습니다


Indexing the array: Shift right with variable sized arrays
* Write a statement to shift the array contents 1 position to the left. * Assign the rightmost element with -1. Ex: [12, 85...

대략 10년 전

문제를 풀었습니다


Relational operators and row arrays: Run times
* Construct a row array fastRunTimes containing all elements of runTimes equal to or less than 480 seconds. Ex: If runTimes =...

대략 10년 전

문제를 풀었습니다


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

대략 10년 전

문제를 풀었습니다


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

10년 초과 전

문제를 풀었습니다


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

10년 초과 전

문제를 풀었습니다


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

10년 초과 전

문제를 풀었습니다


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

10년 초과 전

문제를 풀었습니다


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (http://en.wikipedia.org...

10년 초과 전

문제를 풀었습니다


Least common multiple of many numbers
1:6 -> 60

10년 초과 전

문제를 풀었습니다


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

10년 초과 전

문제를 풀었습니다


longest sequence of nans
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

10년 초과 전

문제를 풀었습니다


If you prick us, do we not bleed?
While doing some quick sewing to fix up your child's Halloween costume, you accidentally jab your finger with the needle. Refle...

10년 초과 전

문제를 풀었습니다


replace nan values iteratively.
replace nan values with the average of two neighbour non-nan value iteratively as follow; x = [2; 4; 6; nan; nan; nan; 10]; ...

10년 초과 전

문제를 풀었습니다


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

10년 초과 전

문제를 풀었습니다


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

10년 초과 전

문제를 풀었습니다


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

10년 초과 전

문제를 풀었습니다


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

10년 초과 전

문제를 풀었습니다


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

10년 초과 전

문제를 풀었습니다


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

10년 초과 전

문제를 풀었습니다


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

10년 초과 전

문제를 풀었습니다


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

10년 초과 전

문제를 풀었습니다


become the batman and save gotham!!!
:\\YOU ARE THE BATMAN//: Batman needs your help to save gotham city from its villains! One day while patrolling the streets...

10년 초과 전

문제를 풀었습니다


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

10년 초과 전

문제를 풀었습니다


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

10년 초과 전

더 보기