Community Profile

photo

amirhosein alimohammadi


96 total contributions since 2018

Contact

amirhosein alimohammadi's Badges

  • Creator
  • Promoter
  • CUP Challenge Master
  • Solver

View details...

Contributions in
View by

Problem


Find The Difference
Vector x is given.calculate the difference between the biggest and the smallest number that we can create from elements of x. f...

ongeveer een jaar ago | 1

Problem


Solve The Equation
the coefficients of a system of equation is given with two vector x1 and x2. you have to solve the equation and add the answers....

ongeveer een jaar ago | 2

Solved


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

ongeveer een jaar ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

ongeveer een jaar ago

Solved


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

ongeveer een jaar ago

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

ongeveer een jaar ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

ongeveer een jaar ago

Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

ongeveer een jaar ago

Solved


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

ongeveer een jaar ago

Solved


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

ongeveer een jaar ago

Solved


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

ongeveer een jaar ago

Solved


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

ongeveer een jaar ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

ongeveer een jaar ago

Solved


radius of a spherical planet
You just measured its surface area, that is the input.

ongeveer een jaar ago

Solved


Energy of a photon
*&#9883 &#9762 &#9883 &#9762 &#9883 &#9762 &#9883* Given the frequency F of a photon in giga hertz. Find energy E of this...

ongeveer een jaar ago

Solved


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

ongeveer een jaar ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

ongeveer een jaar ago

Solved


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

ongeveer een jaar ago

Solved


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

ongeveer een jaar ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

ongeveer een jaar ago

Solved


square of a number
find square of a given number

ongeveer een jaar ago

Solved


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

ongeveer een jaar ago

Solved


Area of square
Find the area of a square whose diagonal length is given as x.

ongeveer een jaar ago

Solved


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

ongeveer een jaar ago

Solved


Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.

ongeveer een jaar ago

Solved


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

ongeveer een jaar ago

Solved


Find the sum of n squares
What is the sum of the squares of the first n integers?

ongeveer een jaar ago

Solved


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

ongeveer een jaar ago

Solved


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

ongeveer een jaar ago

Solved


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

ongeveer een jaar ago

Load more