Risolto


Non trivial identities - flipping
Return x by flipping it.

oltre 6 anni fa

Risolto


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

oltre 6 anni fa

Risolto


Area of polygon
Given the vertices in vectors X,Y, return the area of the polygon they define.

oltre 6 anni fa

Risolto


Polynomial evaluation
Compute the value of a polynomial of degree n with coeffcients in vector a, at value x. p(x)=a(1)+a(2)x+a(3)x^2+...+a(n+1)x...

oltre 6 anni fa

Risolto


Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

oltre 6 anni fa

Risolto


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

oltre 6 anni fa

Risolto


The last non-zero digit of a factorial
For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

oltre 6 anni fa

Problema


Investigate the frequency of last digits of prime numbers
The last digit of a prime number greater than 5 can be 1, 3, 7, or 9. If the primes are distributed randomly, then these digits ...

oltre 6 anni fa | 4 | 28 risolutori

Risolto


Find my secret function II
If give my function a x value it will give me a y value, so find the secret of it: Examples: input x=23 ---- >>> output y=1...

oltre 6 anni fa

Risolto


Find the average of a random sequance
Write a function that generates random integers within a loop, and calculates the mean of the positive numbers only. At each ...

oltre 6 anni fa

Risolto


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

oltre 6 anni fa

Risolto


Sudoku square
We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

oltre 6 anni fa

Risolto


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

oltre 6 anni fa

Risolto


Check if integer is a prime number
Check if integer i is a prime number. Returns logical true '1' if it is.

oltre 6 anni fa

Risolto


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

oltre 6 anni fa

Risolto


*Prime number check 2 (in construction)
Another way to see if a number is prime is to count the number of factors. For example, the number 4 has 2 factors, [ 2 4 ]...

oltre 6 anni fa

Risolto


Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

oltre 6 anni fa

Risolto


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

oltre 6 anni fa

Risolto


Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

oltre 6 anni fa

Risolto


Polynomial Multiplication
Multiply two polynomial equation.Given polynomial coefficients a and b.

oltre 6 anni fa

Risolto


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

oltre 6 anni fa

Risolto


Check prime numbers
Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;

oltre 6 anni fa

Risolto


Prime number removal
remove all prime numbers from the input e.g. input = 1 2 3 4 5 6 7 8 9 10 11 12 ...

oltre 6 anni fa

Risolto


Ugly numbers - 01
Ugly numbers are those whose prime factors are 2, 3 or 5. find the nth ugly number.

oltre 6 anni fa

Risolto


GPA
Math's credit is 5 and you got x | Physics's credit 7 and you got y what is your GPA

oltre 6 anni fa

Risolto


Nth root of a number
Given an input and a number N, find the Nth root of the number(s)

oltre 6 anni fa

Risolto


Check if there are white spaces in the input string
If there are white spaces in the input string, output=1 else 0

oltre 6 anni fa

Risolto


ASCII sum of phrases
Find the sum of the numeric equivalents of all characters entered in a phrase. For example: for the phrase 'My name is test', th...

oltre 6 anni fa

Carica altro