Solutions for Comarch "Amplitude" and "Greater common divisor" tasks.