using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { public void Proc() { Reader.IsDebug = false; int[] inpt = Reader.GetInt(); int total = inpt[0]; int maxItemCount = inpt[1]; this.CreatePrimeNumberList(total); int ans = 1; if(total % 2 == 0) { ans = total / 2; } else { foreach (int num in PrimeNumberList) { if(total % num == 0) { int tmp = total / num; ans = tmp * (num / 2); break; } } } Console.WriteLine(ans); } private List PrimeNumberList = new List(); private void CreatePrimeNumberList(int max) { bool[] flags = new bool[max+1]; List list = new List(); for(int i=2; i