已解决


Hyperperfect Numbers
A k-hyperperfect number is a natural number n for which the equality n = 1 + k(σ(n) − n − 1) holds, where σ(n) is the divisor ...

2 years 前

已解决


Amicable pair
Amicable numbers are two different numbers such that the sum of the proper divisors of each is equal to the other number. For e...

2 years 前

已解决


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

2 years 前

已解决


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

2 years 前

已解决


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

2 years 前

已解决


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

2 years 前

已解决


Extract the Acrostic Message
An acrostic cipher is a way of embedding one message within another by taking the first (or last) word of each line. Given a str...

2 years 前

已解决


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

2 years 前

已解决


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

2 years 前

已解决


Area under the curve
Compute area under the curve specified by points stored in y, where y is in range (0,inf) and x time step is 1. note: please r...

2 years 前

已解决


Linear system solve
Solve a linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/linsolv1.pdf

2 years 前

已解决


Persistent Usage
This Challenge is to implement the Matlab Persistent variable capability. Given a sequence of Calls to a function return the cu...

2 years 前

已解决


Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

2 years 前

问题


Easy Sequences 79: Trailing Zeros of Fibonorial Numbers at any Base
The fibonorial of an integer is defined as follows: where: is the -th Fibonacci number ( and for ). I...

2 years 前 | 0 | 3 个解题者

已解决


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

2 years 前

已解决


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

2 years 前

已解决


Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n. Fun note: technically it...

2 years 前

已解决


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

2 years 前

已解决


Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.

2 years 前

问题


Easy Sequences 78: Trailing Zeros of Factorial Numbers at any Base
Given an integer and a number base , write a function that calculates the number of trailing zeros of the factorial of when wr...

2 years 前 | 1 | 3 个解题者

已解决


Fill a rectangle with 1x1 and 2x2 tiles
A 3x2 rectangle can be filled with 1x1 and 2x2 tiles in three ways: The colors merely distinguish the sizes of the tiles. A 3...

2 years 前

已解决


Count unique orderings of vertices of a polygon
Cody Problem 2671 asks us to determine whether four points can be the corners of a rectangle. The points are not necessarily inp...

2 years 前

已解决


Check if vertices form a rectangle
Given a set of 4 vertices defined by vectors X and Y, return true if the vertices form a rectangle and false otherwise. X and Y...

2 years 前

已解决


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

2 years 前

已解决


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

2 years 前

已解决


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

2 years 前

已解决


Easy Sequences 77: Powers of Fibonacci Numbers
Given integers and , we are asked to evaluate the following function: . That is, equals raised to the power of the -th Fibona...

2 years 前

已解决


Where the Four Corners Am I?
The "Four Corners" region of the US is where Colorado, Utah, Arizona, and New Mexico all meet - the only place where four states...

2 years 前

已解决


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

2 years 前

已解决


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

2 years 前

加载更多