Олимпиадный тренинг

Задача 37554. Vietnamese craftsmen


Vietnamese folk craftsmen make decorative panels from pieces of rice straw, sticking them on boards. What is the smallest length (in mm) that the straw must be so that it can be cut into equal parts along A mm and B mm without cutting?

Write the solution to the problem as a function solve(A, B) that returns the answer. You don't need to enter or withdraw anything!

Examples
# Input Output
1 20 27 540

Запрещенные операторы:lcm;gcd