Resuelto


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

casi 5 años hace

Resuelto


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

casi 5 años hace

Resuelto


Roman numbers: how old is that building?
The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

casi 5 años hace

Resuelto


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

casi 5 años hace

Resuelto


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

casi 5 años hace

Resuelto


Compute the sum of reciprocals of quadratics
Write a function to compute the following sum: See also Cody Problem 46000.

casi 5 años hace

Resuelto


Rock Paper Scissors Lizard Spock

casi 5 años hace

Resuelto


Pick the die most likely to win
After discussing Rock, Paper, Scissors, Lizard, Spock in The Simpsons and their Mathematical Secrets, Simon Singh writes that in...

casi 5 años hace

Resuelto


Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the el...

casi 5 años hace

Resuelto


All flights lead to Idaho Falls
Using spherical trigonometry and great circle paths, determine the distance (in kilometers) and the initial flight heading (from...

casi 5 años hace

Resuelto


Compute the effective conductivity of a heterogeneous aquifer
Slow flow through soil or another porous medium follows Darcy’s law, which relates the flow of water to the gradient in piezome...

casi 5 años hace

Resuelto


Compute a sum involving the totient over divisors of a number
Write a function to compute the following sum: where is the totient function. The sum is computed over the divisors of (inc...

casi 5 años hace

Resuelto


Nuclear Binding Energy
Compute the approximate nuclear binding energy in MeV using the least-squares fit of the semi-emirical mass formula. Round to th...

casi 5 años hace

Resuelto


List Proth primes

casi 5 años hace

Resuelto


Median computation (★★★)
See easy edition of this problem. However, now you must compute the median of any real-valued vector without using the in-built...

casi 5 años hace

Resuelto


Approximate functions 2 (★★★★)

casi 5 años hace

Resuelto


Eliminate redundant numbers in text
Occasionally someone might write text such as Briefly explain one (1) common problem that can result from the constant use of ...

casi 5 años hace

Resuelto


Identify Ruth-Aaron numbers
After Hank Aaron hit his 715th home run and passed Babe Ruth’s total of 714, Carl Pomerance noticed that the union of the prime ...

casi 5 años hace

Resuelto


Uranium–Lead Dating

casi 5 años hace

Resuelto


Solve an ODE: equation C
Write a function to solve the following ordinary differential equation: with and . The parameter is a constant. The functi...

casi 5 años hace

Resuelto


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

casi 5 años hace

Resuelto


Compute a sum of Ramanujan
Srinivasa Ramanujan defined the following function: Write a function to compute for various values of . See also Cody Proble...

casi 5 años hace

Resuelto


Compute the harmonic numbers
The nth <https://mathworld.wolfram.com/HarmonicNumber.html harmonic number> is defined as the sum of the reciprocals of the inte...

casi 5 años hace

Resuelto


Find the smallest integer m such that n divides m!
Write a function that takes an integer and finds the smallest integer whose factorial is divisible by . For example, if , then...

casi 5 años hace

Resuelto


Reverse Boggle
*Description* In the classic Parker Brothers game <http://en.wikipedia.org/wiki/Boggle Boggle>, players find words from a 4x4...

casi 5 años hace

Resuelto


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

casi 5 años hace

Resuelto


Code breaker, Part II: Operation Orthos
You have been tasked with decoding several batches of coded messages that have been intercepted. Based on previous intellig...

casi 5 años hace

Resuelto


Code breaker, Part I: Operation Phoenix
You have been tasked with decoding a set of coded messages that have been intercepted. Based on previous intelligence that ...

casi 5 años hace

Resuelto


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

casi 5 años hace

Cargar más