Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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.

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Gelöst


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

etwa 5 Jahre vor

Mehr laden