Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace LMM
- {
- class LMM
- {
- static void Main()
- {
- int[] array = new int[5];
- for (int i = 0; i < 5; i++) // точка 1 от алгоритъма по-горе
- {
- array[i] = int.Parse(Console.ReadLine());
- }
- int counter = 0;
- int LMM = 0;
- for (int i = 1; i <= 970200; i++) // точка 2 от алгоритъма по-горе
- {
- for (int j = 0; j < 5; j++) // точка 3 от алгоритъма по-горе
- {
- if (i % array[j] == 0) // точка 4 от алгоритъма по-горе
- {
- counter++;
- }
- }
- if (counter >= 3) // точка 5 от алгоритъма по-горе
- {
- LMM = i;
- break;
- }
- else
- {
- counter = 0;
- }
- }
- Console.WriteLine(LMM); // точка 6 от алгоритъма по-горе
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement