Problema


Sum the unitary divisors of a number
Cody Problems 1933 and 46898 deal with , the sum of divisors function. This problem deals with , the sum of unitary divisors fun...

quasi 4 anni fa | 1 | 14 risolutori

Problema


Count the unitary divisors of a number
Cody Problem 56738 asks for a list of the unitary divisors of a number. For this problem, write a function to count the unitary ...

quasi 4 anni fa | 0 | 16 risolutori

Problema


List unitary divisors of a number
A unitary divisor of a number divides and satisfies gcd(,) = 1. For example, 9 is a unitary divisor of 18 because gcd(9,2) = ...

quasi 4 anni fa | 1 | 16 risolutori

Risolto


freeeeee
free points

quasi 4 anni fa

Risolto


Determine if a given input is even or odd?
Given an input, determine if even or odd.

quasi 4 anni fa

Risolto


Cumulative minimum of an array
Find the cumulative minimum of an array without using the built-in function <http://www.mathworks.com/help/matlab/ref/cummin.htm...

quasi 4 anni fa

Risolto


Cumulative maximum of an array
Find the cumulative maximum of an array without using the built-in function cummax (and a few others). Your function should act ...

quasi 4 anni fa

Risolto


Spectral Distance - Speed Scoring
Find quantity of pixels within a spectral distance from a given [r,g,b] spectra. *Spectral distance* = sqrt( (r0-ri)^2+(g0-gi...

quasi 4 anni fa

Risolto


Cricket - Career Batting Statistics
Given a vector s of strings representing a batter's individual innings scores, return their career statistics as a 4-element (nu...

quasi 4 anni fa

Risolto


IQpuzzler Preparation #2: Detect isolated zeros in a 2D matrix
Return true if any isolated single zeros are present in the input M-by-N matrix (zeros with all adjacent elements being non-zero...

quasi 4 anni fa

Risolto


Estimating Euler's (Oi-ler-z) Number
Euler's number is an irrational constant given by Starting with x=0, count the number of times you can add a uniformly distrib...

quasi 4 anni fa

Risolto


A Binary Search
One way to locate a target value in a sorted array, is to use a binary search algorithm. Here, you test if the midpoint in the a...

quasi 4 anni fa

Risolto


Generate Pascal's Triangle Matrix
Pascal's triangle is an arrangement of numbers where each value is the sum of the values adjacent to it in the previous row: ...

quasi 4 anni fa

Risolto


Where the Four Corners Am I? (Vectorized)
NOTE: this problem is intended to build on problem #55960 ("Where the Four Corners Am I?"). You may wish to solve that problem f...

quasi 4 anni fa

Risolto


Create block matrix of integers (j+k-1) - Part II
Given m, n, p, and q, create an m-by-n matrix made up of submatrices, each sized p-by-q (if possible - the last row and column o...

quasi 4 anni fa

Risolto


Possible Rugby Scores
Given a natural number s (> 4), representing a rugby team's score, return an n-by-3 matrix representing all n possible combinati...

quasi 4 anni fa

Risolto


Acid-Base Chemistry: Which side of the reaction is more favorable?
In an Acid-Base reaction, there is always going to be an acid, a base, a conjugate acid, and a conjugate base. When provided wit...

quasi 4 anni fa

Risolto


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

quasi 4 anni fa

Risolto


Calculate Angle From Axis
Given coordinates x and y, an axis ("X" or "Y"), and a direction ("cw" or "ccw", meaning clockwise and counterclockwise, respect...

quasi 4 anni fa

Risolto


Interpolated Value Between Two Points
Given two points, and , a new location x, and a method "linear" or "cubic", return the value of a linear or cubic interpolant t...

quasi 4 anni fa

Risolto


Next Tribonacci Number
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

quasi 4 anni fa

Risolto


Just square the input
Square the number

quasi 4 anni fa

Risolto


Angle Between Analog Clock Hands
Given a datetime variable t, return the angle (in degrees) between the hour and minute hands of an analog clock at the time repr...

quasi 4 anni fa

Risolto


Boustrophedon
Given a vector v and a positive integer n, return an m-by-n matrix containing the elements of v row-wise, alternating left-to-ri...

quasi 4 anni fa

Risolto


Dartboard Average II
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

quasi 4 anni fa

Risolto


Triangle Coordinates
Given a natural number n, return two -element vectors, x and y, containing the coordinates of a triangular arrangement of points...

quasi 4 anni fa

Risolto


Is the number of 1s in a binary integer odd or even?
Your function should turn the input integers into binary form and count the number of 1s in the binary. If the number is odd, re...

quasi 4 anni fa

Risolto


List numbers that are not in the Fibonacci sequence
In the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a funct...

quasi 4 anni fa

Risolto


Cricket - Represent Average in "Dulkars" and "Ses"
Sachin Tendulkar's Test average was 53.78. So if Tendulkar = 53.78, one dulkar = 5.378. Similarly, Roger Twose's average was 25....

quasi 4 anni fa

Risolto


Cricket - Peak Batting Average
Given a vector s of strings representing a batter's individual innings scores (in chronological order), return the highest batti...

quasi 4 anni fa

Carica altro