Community Profile

# cokakola

##### Last seen: 2ヶ月 前
886 2016 年以降の合計貢献数

#### cokakola's バッジ

すべて表示

Capture the flag(s)
Flags are distributed randomly on a large board. Starting from the corner position your goal is to capture as many flags as poss...

2ヶ月 前

Find the next prime number
Find the next prime number or numbers for given n. For example: n = 1; out = 2; or n = [5 7]; out = [7 11]; ...

2ヶ月 前

Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

2ヶ月 前

Find nearest prime number less than input number
Find nearest prime number less than input number. For example: if the input number is 125, then the nearest prime number whi...

2ヶ月 前

Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

2ヶ月 前

GJam 2014 China Rd B: Sudoku Checker
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku>. Large Cas...

2ヶ月 前

Sudoku Solver - Standard 9x9
Solve a Standard 9x9 <http://en.wikipedia.org/wiki/Sudoku Sudoku>. Values 1 thru 9 occur in each row, column, and the nine non-o...

2ヶ月 前

BLOCK x3 (Version 1)
<https://play.google.com/store/apps/details?id=com.noodlecake.blockblock BLOCK x3> is a simple, fun and relaxing puzzle game. ...

3ヶ月 前

BLOCK x3 (Version 2)
An extension to problem 2451 ( <https://www.mathworks.com/matlabcentral/cody/problems/2451-block-x3-version-1> ). It is based...

3ヶ月 前

On a two-dimensional board with 2n + 1 rows and 2n + 1 columns, all (2n + 1)^2 positions of the board, except the central one, a...

3ヶ月 前

Win all the time!
This is a 2-players game. One of them is your algorithm. Your algorithm must win in all games. In this game there are 3 rows...

3ヶ月 前

On a one-dimensional board with n + m + 1 cells, there are n counters in the first n cells representing Toads and m counters in ...

3ヶ月 前

Sokoban: Puzzle 10.45
The <http://www.game-sokoban.com/index.php?mode=level&lid=16138 Sokoban Site> has many puzzles to solve. This Challenge is to s...

3ヶ月 前

The sliding puzzle: 15
If you are unfamiliar with the sliding puzzle, enter the command _fifteen_ in your MATLAB command window (or search online, of c...

3ヶ月 前

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

3ヶ月 前

Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

3ヶ月 前

Variation of the Original Classic PONG game brought to Cody. PONG 002 is a rectangular board (2000,1000) with slower initial ve...

4ヶ月 前

Variation of the Original Classic PONG game brought to Cody. PONG 003 is a rectangular board (2000,1000) with reasonable veloci...

4ヶ月 前

Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

4ヶ月 前

Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

4ヶ月 前

Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

4ヶ月 前

Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

4ヶ月 前

Kurchan 4x4 - Optimal score
Related to Problem 1646, but bigger. Technically, all you need to do for this Cody problem is input a 4x4 matrix containing the...

4ヶ月 前

What can you get for exactly amount of money(harder)
Inspired by "Problem 42996. what can you get for exactly amount of money" <https://ww2.mathworks.cn/matlabcentral/cody/problems...

4ヶ月 前

So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

4ヶ月 前

Penny Distribution Machine
A machine consists of a row of boxes. To start, one places N pennies in the leftmost box. The machine then redistributes the pen...

4ヶ月 前

Penny Flipping: Reverse subsets of a sequence of coins until you recover the original configuration
The original Penny Flipping Problem (PF-1) starts with a stack of N pennies arranged with all the coins heads up. The first oper...

4ヶ月 前

Sum of combinations
Input: *X = 40*, *Y = [40 20 10 4]* Output: *Z = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 ...

4ヶ月 前

Recycled Numbers (CodeJam Qualification Round 2012)
Let's say a pair of distinct positive integers ( _n_ , _m_ ) is recycled if you can obtain _m_ by moving some digits from the ...

4ヶ月 前

Sleeping Queens 1
My youngest daughter received a card game named Sleeping Queens for Christmas this year, and has been playing it nearly non-stop...

4ヶ月 前