Competitive-Programming-and-Contests-VP-Solution

The repository that contains all solutions made for the course Competitive Programming and Contests by the University of Pisa

View the Project on GitHub

Magic Numbers

Solved Solution Time :clock11:
:heavy_check_mark: Greedy Algorithm 62 ms

Solution or Solution discussion

To find if the number is a magic number we can work in a string an make some check to define when the number is not a magic number, in other words a magic number is defined from the concatenation of tree different type of number that are

A number it is not a magic number when

If the previous point are all verified the number is a magic number.