結果

問題 No.341 沈黙の期間
ユーザー nanophoto12
提出日時 2016-02-14 00:20:01
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 615 bytes
コンパイル時間 801 ms
コンパイル使用メモリ 110,348 KB
実行使用メモリ 26,688 KB
最終ジャッジ日時 2024-09-22 06:18:52
合計ジャッジ時間 1,692 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #
プレゼンテーションモードにする

using System;
using System.Collections.Generic;
namespace Yukicoder
{
public static class Program
{
public static void Main (string[] args)
{
string line = Console.ReadLine ();
int count = 0;
int front = 0;
int maxValue = 0;
while (front < line.Length) {
var index = line.IndexOf ("", front);
if (index < 0) {
break;
}
if (index != front) {
front = index;
maxValue = Math.Max (count, maxValue);
count = 0;
} else {
front++;
count++;
}
}
maxValue = Math.Max (count, maxValue);
Console.WriteLine (maxValue.ToString ());
}
}
}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0