Community Profile

# cokakola

##### Last seen: ungefär en månad ago
886 total contributions since 2016

View all

Contributions in
View by

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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.

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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

Solved

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