Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.Serialization;
- namespace SELECTED_MEMBERS
- {
- class Program
- {
- static void Main(string[] args)
- {
- int [] A = new int[10];
- var k = Int32.Parse(Console.ReadLine());
- for (int i = 0; i < 10; i++)
- {
- A[i] = Int32.Parse(Console.ReadLine());
- }
- Console.Write(A[0] + " ");
- for (int i = 1; i <=10; i++)
- {
- if (A[i] != -1)
- {
- if (i % k == 0)
- {
- Console.Write(A[i] + " ");
- }
- }
- else
- {
- Console.Write(A[i] + " ");
- break;
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment