The repository that contains all solutions made for the course Competitive Programming and Contests by the University of Pisa
Solved | Solution | Time |
---|---|---|
Greedy Algorithm | 62 ms |
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.