Resuelto


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

alrededor de 5 años hace

Resuelto


Optimally fill a container with elements of different sizes
Given a row vector V of different numerical values and a size limit L, return a 1x2 vector A, containing (a) the largest sum of ...

alrededor de 5 años hace

Resuelto


Simpsons's rule (but not Homer Simpson)
I wonder what Homer Simpson would have thought of Simpson's rule? Somehow I doubt his thoughts would have included the phrase Ne...

alrededor de 5 años hace

Resuelto


Vector addition
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

alrededor de 5 años hace

Resuelto


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

alrededor de 5 años hace

Resuelto


Hexagonal numbers on a spiral matrix
Put hexagonal numbers in a ( m x m ) spiral matrix and return the sum of its diagonal elements. Formula of hexagonal numbers ...

alrededor de 5 años hace

Resuelto


Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...

alrededor de 5 años hace

Resuelto


Calculating large fibonacci numbers
The fibonacci sequence starts 1,1,2,3,5,8... Find the the n'th fibonacci number. Then calculate round(log10( . )) of that n't...

alrededor de 5 años hace

Resuelto


Mean number of letters per word (Easy)
Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...

alrededor de 5 años hace

Resuelto


Euclidean inter-point distance matrix
The Euclidean distance between two points in a p-dimensional space is a really common thing to compute in the field of computati...

alrededor de 5 años hace

Resuelto


Lunar Arithmetic (Multiplication)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit when adding and take ...

alrededor de 5 años hace

Resuelto


Find left eigenvector of row stochastic matrix
Find the left eigenvector of the given stochastic matrix P that has eigenvalue 1. Normalize the vector so the sum of the entri...

alrededor de 5 años hace

Resuelto


The glass half full
Identical glasses are placed in a triangular tower structure, such that the top level (L = 1) comprises one glass, the next leve...

alrededor de 5 años hace

Resuelto


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

alrededor de 5 años hace

Resuelto


Find two triangular numbers whose sum is input.
Find two triangular numbers whose sum is _input_. Note: The difference beetween the triangular numbers should be minimum.

alrededor de 5 años hace

Resuelto


I'm going to enjoy watching you calculate, Mr Anderson
Smith numbers are numbers such that if you add up all of the digits in the number, that sum equals the sum of all of the digits ...

alrededor de 5 años hace

Resuelto


Nth roots of unity
First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

alrededor de 5 años hace

Resuelto


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

alrededor de 5 años hace

Resuelto


Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

alrededor de 5 años hace

Resuelto


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

alrededor de 5 años hace

Resuelto


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

alrededor de 5 años hace

Resuelto


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

alrededor de 5 años hace

Resuelto


Smallest n, for n! to have m trailing zero digits
For given positive integer n, its factorial often has many trailing zeros, in other words many factors of 10s. In order for n! t...

alrededor de 5 años hace

Resuelto


Under the sea: Snell's law & total internal reflection
<https://en.wikipedia.org/wiki/Snell's_law> When a light travels from one medium to another medium, depending on the refracti...

alrededor de 5 años hace

Resuelto


Fermat's Last Theorem - Fermat's conjecture
Fermat's Last Theorem (sometimes called Fermat's conjecture, especially in older texts) states that no three positive integers a...

alrededor de 5 años hace

Resuelto


Find the function 2
Given a set of point (x,y) and the coordinate x of a new point, find the y value of new point. Test Suite is based on only one ...

alrededor de 5 años hace

Resuelto


Polarisation
You have n polarising filters stacked one on top of another, and you know each axis angle. How much light gets passed through th...

alrededor de 5 años hace

Resuelto


Is it a mail?
Electronic mail, or email, is a method of exchanging digital messages between people using digital devices such as computers, mo...

alrededor de 5 años hace

Resuelto


Make a checkerboard matrix (★★★★★)
(copy of Prob. 4) Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1...

alrededor de 5 años hace

Resuelto


Longest run of consecutive numbers (★★★★★)
(copy of Problem 672) Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you...

alrededor de 5 años hace

Cargar más