using System; using System.Collections.Generic; using System.Linq; //YukiCoder341 沈黙の期間 //http://yukicoder.me/problems/no/341 class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("……何でもないです。"); //2 } else if (InputPattern == "Input2") { WillReturn.Add("………別に………"); //3 } else if (InputPattern == "Input3") { WillReturn.Add("……………"); //5 } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); string S = InputList[0]; int Answer = 0; int SeqCnt = 0; for (int I = 0; I <= S.Length - 1; I++) { if (S[I] == '…') { SeqCnt++; } if (S[I] != '…' || I == S.Length - 1) { if (Answer < SeqCnt) Answer = SeqCnt; SeqCnt = 0; } } Console.WriteLine(Answer); } }