Community Profile

photo

Peiyi Yao


Last seen: 4일 전
726 2015 이후 총 참여 횟수

Peiyi Yao's 배지

  • Scholar
  • CUP Challenge Master
  • Solver

세부 정보 보기...

참여 게시물
보기 기준

해결됨


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

8일 전

해결됨


Draw 'F'
Draw a x-by-x matrix 'F' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

8일 전

해결됨


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

8일 전

해결됨


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

8일 전

해결됨


Draw 'O' !
Given n as input, generate a n-by-n matrix 'O' using 0 and 1 . example: n=4 ans= [1 1 1 1 1 0 0 1 ...

8일 전

해결됨


Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

8일 전

해결됨


Draw a 'Z'.
Given _n_ as input, generate a n-by-n matrix like 'Z' by _0_ and _1_ . Example: n=5 ans= [1 1 1 1 1 0 0 0 1 ...

8일 전

해결됨


Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

8일 전

해결됨


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

8일 전

해결됨


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

8일 전

해결됨


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

9일 전

해결됨


Draw 'I'
Given n as input, draw a n-by-n matrix 'I' using 0 and 1. example: n=3 ans= [0 1 0 0 1 0 0 1 0] n=...

10일 전

해결됨


Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

10일 전

해결됨


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

11일 전

해결됨


ベクトルの値が増加しているかを調べよう
ベクトルの値が増加している場合 (ベクトルの各要素が前の要素よりも大きい場合) には true を、そうでない場合には false を返すようなコードを書いてみましょう。 例: 入力が x = [-3 0 7] のとき、 関数の...

11일 전

해결됨


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

11일 전

해결됨


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

15일 전

해결됨


modulus of a number
find the modulus of a given number

15일 전

해결됨


Finding an element in a vector
x is a vector of unknown length your function should return the index of the first element in the vector that is greater than...

15일 전

해결됨


Conversion from hours to mili sec
Convert given input in hours to mili seconds

15일 전

해결됨


UICBioE240 problem 1.13
Compute the following - y = x^5/(x^-1) and y = (1-(1/x^5))^-1. Have the final answer of y to equal a 1 by 2 vector.

15일 전

해결됨


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

15일 전

해결됨


Add one raw in given matrix as shown in example
*Add one raw in given matrix as shown in example* A=[1 0;0 1]; X=[3 5]; Answer must be:[1 0; 0 1;3 5]

16일 전

해결됨


Reverse a string
Reverse the given string. Example input = 'reverse' output = 'esrever'

16일 전

해결됨


Sum of series V
What is the sum of the following sequence: Σk(k+1) for k=1...n for different n?

16일 전

해결됨


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

16일 전

해결됨


Reverse Calculator
Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

24일 전

해결됨


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

24일 전

해결됨


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

24일 전

해결됨


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

24일 전

Load more