Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static int res, del19, vsego;
- static int[] x;
- static void InputProcessing()
- {
- if (x[0] % 19 == 0) del19++;
- vsego++;
- x[0] = x[1]; x[1] = x[2]; x[2] = x[3];
- x[3] = int.Parse(Console.ReadLine());
- if (x[3] % 19 == 0) res += vsego;
- else res += del19;
- }
- static void Main()
- {
- res = del19 = vsego = 0;
- x = new int[4];
- int n = int.Parse(Console.ReadLine());
- for (int i = 0; i < n; i++)
- {
- if (i < 4) x[i] = int.Parse(Console.ReadLine());
- else InputProcessing();
- }
- Console.WriteLine(res);
- Console.ReadKey();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement