Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class LeastMajorityMultiple
- {
- static void Main()
- {
- uint a = uint.Parse(Console.ReadLine());
- uint b = uint.Parse(Console.ReadLine());
- uint c = uint.Parse(Console.ReadLine());
- uint d = uint.Parse(Console.ReadLine());
- uint e = uint.Parse(Console.ReadLine());
- uint counter = 0;
- uint i = 0;
- do
- {
- counter = 0;
- i++;
- if (i % a == 0)
- {
- counter++;
- }
- if (i % b == 0)
- {
- counter++;
- }
- if (i % c == 0)
- {
- counter++;
- }
- if (i % d == 0)
- {
- counter++;
- }
- if (i % e == 0)
- {
- counter++;
- }
- }
- while (counter < 3);
- Console.WriteLine(i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement