Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace kitkat
- {
- class Program
- {
- static void Main(string[] args)
- {
- string input = Console.ReadLine();
- int n = Convert.ToInt32(input.Split(' ')[0]);
- int m = Convert.ToInt32(input.Split(' ')[1]);
- if (n % m == 0)
- Console.WriteLine(n / m);
- else
- for (int i = 0; i < (m * n + 1); i++)
- if (i % n == 0 && i % m == 0)
- {
- if (i != 0)
- {
- Console.WriteLine(i);
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement