Solved


I'm going to enjoy watching you calculate, Mr Anderson
Smith numbers are numbers such that if you add up all of the digits in the number, that sum equals the sum of all of the digits ...

1 month ago

Solved


Investigate the frequency of last digits of prime numbers
The last digit of a prime number greater than 5 can be 1, 3, 7, or 9. If the primes are distributed randomly, then these digits ...

1 month ago

Solved


List the ways to write 1/n as the sum of two unit fractions
Cody Problem 59841 involved counting the ways that can be written as the sum of two unit fractions (those with a numerator of 1...

1 month ago

Solved


Compute the tersum
The tersum, which appears in certain mathematical games, involves adding two numbers in base 3 without carry and converting back...

1 month ago

Solved


Pell numbers
Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

1 month ago

Solved


Frugal number
check whether n is a frugal number * a frugal number is a natural number in a given number base that has more digits than the...

1 month ago

Solved


Be happy
check whether the given number is happy in b-base. A happy number can be defined as a number which will yield 1 when it is repl...

1 month ago

Solved


Cantor counting
Find the nth cantor's rational number. the sequence is given below in the link. Sequence: 1/1,1/2,2/1,3/1,2/2,1/3,1/4... ... .....

1 month ago

Solved


Find numbers in the Popular Computing Z-sequence
Here’s a quick one. In 1977 the magazine Popular Computing sought “problem situations for which the computer is the best (if not...

1 month ago

Solved


List the titles of Cody problems
Cody has several ways to list problems, but I have not yet found an easy way to list them by their numbers. Listing by date crea...

1 month ago

Solved


Pseudo-vampire number
refer to <https://en.wikipedia.org/wiki/Vampire_number> Given a number x, determine whether it is a pseudo-vampire number. A p...

1 month ago

Solved


Fangs of pseudo-vampire number
given a number, find all the fangs of that number. A pseudo-vampire number can have multiple of fangs. The output should be a...

1 month ago

Solved


Last non-zero digit
Given a number n, find the last non-zero digit of the factorial of that number. You need to take care of the large values of n....

1 month ago

Solved


Delete and Earn
You are given an integer array nums. You want to maximize the number of points you get by performing the following operation any...

1 month ago

Solved


Find the Number Farthest from the Mean
Given a nonempty vector A, find the element whose distance from the mean of A is greatest. Return the element, not its distance....

1 month ago

Solved


Optimum Egyptian Fractions
Following problem was inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2126-split-bread-like-the-pharaohs-egypt...

1 month ago

Solved


Make a Pandiagonal Prime Magic Square: 11 x 11
This Fun with Primes Challenge is to create a Pandiagonal Prime Magic Square of size 11x11 given eleven APk sequences with 10 co...

1 month ago

Solved


Leftovers? Again?!
I am thinking of a positive number X. To determine what number I am thinking of, I will give you two 1xN vectors. The first ve...

1 month ago

Solved


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

1 month ago

Solved


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

1 month ago

Solved


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

1 month ago

Solved


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

1 month ago

Solved


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

1 month ago

Solved


Lights Out 1 - 5x5, 3 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

1 month ago

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

1 month ago

Solved


Castling-03
Given the position of different chess pieces on the chessboard, figure out whether castling is valid or not in the next move (wh...

2 months ago

Solved


Castling-02
This is a follow up of problem <https://www.mathworks.com/matlabcentral/cody/groups/1/problems/45329-castling-01> Given...

2 months ago

Solved


Castling-01
Given the position of only one player's chess pieces(some of them) on the chessboard, figure out whether castling is valid or no...

2 months ago

Solved


En passant - 01
This is white's turn. The player moves his pawn. The pawn's previous and current positions are given. Determine whether th...

2 months ago

Solved


King's Cage
Given the position of the king on the chessboard, determine the minimum number of steps it'll require to reach the destination. ...

2 months ago

Load more