解決済み


Reverse a matrix
Its simple. You have to reverse a given matrix.

約5年 前

解決済み


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

約5年 前

解決済み


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

約5年 前

解決済み


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

約5年 前

解決済み


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

約5年 前

解決済み


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

約5年 前

解決済み


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

約5年 前

解決済み


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

約5年 前

解決済み


Area of a circle
Find the value for area of the circle if diameter is given

約5年 前

解決済み


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

約5年 前

解決済み


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

約5年 前

解決済み


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and ...

約5年 前

解決済み


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

約5年 前

解決済み


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

約5年 前

解決済み


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

約5年 前

解決済み


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

約5年 前

解決済み


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

約5年 前

解決済み


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

約5年 前

解決済み


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

約5年 前

解決済み


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

約5年 前

解決済み


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

約5年 前

解決済み


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

約5年 前

解決済み


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

約5年 前

解決済み


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

約5年 前

解決済み


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

約5年 前

解決済み


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

約5年 前

解決済み


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

約5年 前

解決済み


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

約5年 前

解決済み


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

約5年 前

解決済み


How many days in a month?
Return the number of days in a given month in 2017. If the input is not a valid month number, return -1. Examples: Input...

約5年 前

さらに読み込む