Solved


行列内の素数の平均をとろう
行列が与えられたときに、その行列内の素数の平均を計算する関数を作成しましょう。 例: 入力の行列が in = [ 8 3            5 9 ] のとき、 出力が 4 あるいは (3+5)/2 のようになり...

18 days ago

Solved


二乗になっている数を見つけよう
ある数のベクトルが与えられた場合、そのベクトルの要素の一つが他の要素の二乗であれば true を返し、それ以外の場合は false を返すようなコードを書いてみましょう。 例: 入力が a = [2 3 4] のとき、 出力 b は t...

18 days ago

Solved


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

18 days ago

Solved


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

18 days ago

Solved


サイコロを作ろう
1から6までの独立かつランダムな数値を返すような関数を作成しましょう。 例: >> [x1,x2] = rollDice(); と入力すると x1 = 5 x2 = 2 のような解を返します。

18 days ago

Solved


ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける(コンマはオプション)。 x = [1, 2, 3, 4] 問題:次のベクトルを出力する関数を作成せよ。...

18 days ago

Solved


2倍してみよう - ここからスタート!
初めにこの問題を試してみよう。 入力としてxを与え、それを2倍して結果をyに代入せよ。 Examples: Input x = 2 Output y is 4 Input x = 17 Output y is 34 ...

18 days ago

Solved


二つのベクトルの要素ごとの積の平均を計算しよう
二つの同じ長さのベクトルが与えられたとき、二つのベクトルの要素ごとの積の平均を求めましょう。 例: 二つのベクトル [1 2 3] と [10 15 20] が与えられたとき、 それぞれの要素ごとの積の平均を取ると、 解は 33.3333 と...

18 days ago

Solved


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

18 days ago

Solved


Champernowne Constant
The <http://en.wikipedia.org/wiki/Champernowne_constant Champernowne constant> is a real number whose digits in decimal represen...

19 days ago

Solved


Is it an Armstrong number?
An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. Fo...

19 days ago

Solved


P-smooth numbers
This Challenge is to find <https://en.wikipedia.org/wiki/Smooth_number P-smooth number> partial sets given P and a max series va...

19 days ago

Solved


Fermat's Last Theorem - Fermat's conjecture
Fermat's Last Theorem (sometimes called Fermat's conjecture, especially in older texts) states that no three positive integers a...

19 days ago

Solved


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

19 days ago

Solved


Lychrel Number Test (Inspired by Project Euler Problem 55)
The task for this problem is to create a function that takes a number _n_ and tests if it might be a Lychrel number. This is, re...

19 days ago

Solved


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

19 days ago

Solved


Determine if input is a perfect number
A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number. Examp...

19 days ago

Solved


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

19 days ago

Solved


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

19 days ago

Solved


PONG 001: Player vs Wall, 4 Lives, Interactive download
Variation of the Original Classic PONG game brought to Cody. Attempt to keep the ball alive against a Wall. The ball speeds u...

19 days ago

Solved


PACMAT - Ghosts maximize unique locations; 3 Lives
The Classic PACMAN game brought to Cody. PACMAT Ghosts Random requires clearing the board of Yellow Dots while not bumping in...

19 days ago

Solved


PACMAT - Ghosts Random; 3 Lives
The Classic PACMAN game brought to Cody. PACMAT Ghosts Random requires clearing the board of Yellow Dots while not bumping in...

19 days ago

Solved


PACMAT Easy
The Classic PACMAN game brought to Cody. PACMAT_Easy is the simple case of clearing the board of Yellow Dots while not bumpin...

19 days ago

Solved


Give the Shortest Path Through The Maze
*Description* The purpose of this problem is to give the shortest path through a maze. The maze will be provided in a codifie...

19 days ago

Solved


Minefield Sonar
*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

19 days ago

Solved


PACMAT 05 - Optimized Ghosts, PACMAT increasing speed, 12 Lives
The Classic PACMAN game brought to Cody. PACMAT requires clearing the Yellow Dots while avoiding the wandering ghosts in 12 l...

23 days ago

Solved


PACMAT 04 - Optimized Ghosts, Equal Speed, 10 Lives
The Classic PACMAN game brought to Cody. PACMAT requires clearing at least 130 Yellow Dots while avoiding the wandering ghost...

23 days ago

Solved


2048 tile game
The popular 2048 game has been implemented here: http://gabrielecirulli.github.io/2048/ Given the board like this: [2...

23 days ago

Solved


GJam 2014 China Rd B: Dragon Maze
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p3 GJam 2014 China Dragon Maze>. Smal...

23 days ago

Solved


GJam 2014 China Rd A: Maze with a Left Hand Rule
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard#s=p3 GJam 2014 China Cross the Maze>. ...

23 days ago

Load more