using System; using System.Collections.Generic; class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("2"); //1 //頂点0と頂点1の2個の頂点がある。 //この2つの頂点を1つの辺で繋げば良い。 } else if (InputPattern == "Input2") { WillReturn.Add("4"); //3 //頂点0と頂点1と頂点2と頂点3がある。 //例えば、頂点0と頂点1、頂点1と頂点2、頂点2と頂点3を繋ぐ方法がある。 //別に、頂点0と頂点1、頂点1と頂点2、頂点1と頂点3を繋ぐ方法もある。 //どちらにしろ繋ぐのに必要な辺の本数は3本である。 } else if (InputPattern == "Input3") { WillReturn.Add("13"); //12 //13個の頂点がある。 //辺を繋いでできるグラフのパターンはたくさんあるが、 //必要な最少の辺の本数は12本である。 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); int N = int.Parse(InputList[0]); Console.WriteLine(N - 1); } }