Community Profile

# McRaecool

### Tongji University

Last seen: 4 mois il y a Actif depuis 2022

Professional Interests:

#### Content Feed

Afficher par

A résolu

Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false. Example...

4 mois il y a

A résolu

MATLAB Basic: rounding II

4 mois il y a

A résolu

Return area of square
Side of square=input=a Area=output=b

4 mois il y a

A résolu

Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

4 mois il y a

A résolu

Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

4 mois il y a

A résolu

Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

4 mois il y a

A résolu

Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

4 mois il y a

A résolu

Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

4 mois il y a

A résolu

Temperature Conversion 1

4 mois il y a

A résolu

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

4 mois il y a

A résolu

Temperature Conversion 2

4 mois il y a

A résolu

Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

4 mois il y a

A résolu

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

4 mois il y a

A résolu

2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

4 mois il y a

A résolu

Missing five
Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

4 mois il y a

A résolu

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

4 mois il y a

A résolu

Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

4 mois il y a

A résolu

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

4 mois il y a

A résolu

Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

4 mois il y a

A résolu

Concatenate input positive integers to obtain a maximum.
Input some integers, you need to concatenate them to obtain a maximum integer. Neither use library function "perms" to list all ...

4 mois il y a

A résolu

Find the next Fibonacci number
In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

4 mois il y a

A résolu

Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

4 mois il y a

A résolu

Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

4 mois il y a

A résolu

Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at http://en.wikipedia...

4 mois il y a

A résolu

Given two arrays, find the maximum overlap
Given two arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. If s1 = [1 2 3 4 5]...

5 mois il y a

A résolu

Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

5 mois il y a