已解决


Sum the rows
Sum the rows of the given matrix. Example x = [ 1 2 3 4 ] y = [ 3 7 ]

2 years 前

已解决


Fun Race
* Given two unary functions foo and goo. * Check whether foo(0) runs faster than goo(0). * Output 1 if foo is faster, otherwis...

2 years 前

已解决


Factor Digits
Check if a given number in an array of numbers is - Equidigital Number - A number that has the same number of digits as the num...

2 years 前

已解决


Vector LCM
Find Least Common Multiple of a given vector. Need general solution as the test suite will be expanded. Function Template: fu...

2 years 前

已解决


List odd twin composites
Twin primes, or prime numbers that differ by 2 (e.g., 17 and 19, 59 and 61, or 191 and 193), are the subject of several Cody pro...

2 years 前

已解决


Easy Sequences 57: "Pretty-gorean" Triangles?
A positive integer is called a regular number, if and only if there exist a non-negative integer , such that . For some reason...

2 years 前

已解决


Easy Sequence 61: Wide Pythagorean Triangles
An integer-sided right triangle with sides , is called a "wide Pythagorean triangle", if , and . Write a program that counts a...

2 years 前

已解决


Easy Sequences 49: Prime Little Omega Function
For an integer , the prime little omega function, , is defined as the total number of distinct prime factors of . So, if , sinc...

2 years 前

已解决


Easy Sequences 68: Factorial Rectangles
I'll celebrate my comeback to Cody with this one easy problem... ---------------- The rectangle below is special: ...

2 years 前

已解决


factorial
There are really some cody problems related to factorial of n, e.g., 42667, 45184, 46054, and etc. It is interesting to ask why ...

2 years 前

已解决


Create a "+" flag
Given two odd numbers, [m, n], return a matrix of size m x n which has all elements of the centre column and centre row set as 1...

2 years 前

已解决


perfect square
Perfect square is amazing, so we have problems like 45183, 34482, 44683, and 44957. But how can we find a large number is a pe...

2 years 前

已解决


Easy Sequences 43: Least Common Fibonacci Number
The Fibonacci sequence is a series whose elements are numbers starting with and , and subsequent Fibonacci numbers are defined...

2 years 前

已解决


Return fibonacci sequence do not use loop and condition version 3
Calculate the nth Fibonacci number,return sequence Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... ...

2 years 前

已解决


Climbing the stairs

2 years 前

已解决


XOR fibonacci
a & b are the first two terms in the xor fibonacci sequence. Find the nth term of that sequence. XOR fib sequence is that in ...

2 years 前

已解决


The other half of the Fibonacci sequence
The <http://mathworld.wolfram.com/FibonacciNumber.html "Fibonacci sequence"> — F = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,...

2 years 前

已解决


Easy Sequences 74: Fibonacci Bank Account
In fantasy world where money does grow on trees, a man decided to top-up his bank account, daily. On the first day he noticed th...

2 years 前

已解决


Fibonacci Word
F1='0' F2='1' F3 is the catenation of the previous two. So, F3 = cat(F2,F1)='10'. similarly, F4 = cat(F3,F2...

2 years 前

已解决


Generalized Fibonacci
The Fibonacci sequence is defined as: Fib(1) = 0 Fib(2) = 1 Fib(N) = Fib(N-1) + Fib(N-2) The Fibonacci sequence can be gener...

2 years 前

已解决


Repeat elements of a vector
Repeat each elements of a given vector according to their values. * x=[1,2,1,3] * y=[1,2,2,1,3,3,3]

2 years 前

已解决


Find Logic 2

2 years 前

已解决


Find Logic 5

2 years 前

已解决


Upper case and lower case!

2 years 前

已解决


Area of Cylindrical Shell
Consider a cylinder with a non-zero thickness with an inner radius of r1 and an outer radius of r2. If the height of the cylinde...

2 years 前

加载更多