Matrix Diagonal Sum
Given a square matrix A of size n x n, write a function to compute the sum of the elements on both the main diagonal and the ant...
11ヶ月 前
解決済み
Moyenne pondérée
Ecrire une fonction qui prend en entrée un vecteur P et un vecteur V et calcule la moyenne pondérée MP des élements vi d'un vec...
11ヶ月 前
問題
Frequencies of prime gaps
Given two positive integers n and , write a function which computes the frequency of the gap between two consecutive of the pr...
11ヶ月 前 | 3 | 28 個のソルバー
解決済み
Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...
Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...
11ヶ月 前
解決済み
Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...
11ヶ月 前
解決済み
Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers.
Given a positive in...
11ヶ月 前
解決済み
List the emirps
An emirp is a prime number that becomes a different prime when reversed. The numbers 13, 17, and 149 are emirps, but 11, 19, and...