結果

問題 No.341 沈黙の期間
ユーザー bluemeganebluemegane
提出日時 2018-09-18 18:50:23
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 53 ms / 5,000 ms
コード長 444 bytes
コンパイル時間 2,755 ms
コンパイル使用メモリ 101,228 KB
実行使用メモリ 22,692 KB
最終ジャッジ日時 2023-09-25 09:52:29
合計ジャッジ時間 5,026 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
20,508 KB
testcase_01 AC 52 ms
22,692 KB
testcase_02 AC 52 ms
18,568 KB
testcase_03 AC 51 ms
20,692 KB
testcase_04 AC 51 ms
20,680 KB
testcase_05 AC 52 ms
20,752 KB
testcase_06 AC 53 ms
22,672 KB
testcase_07 AC 53 ms
22,556 KB
testcase_08 AC 52 ms
20,640 KB
testcase_09 AC 51 ms
20,568 KB
testcase_10 AC 51 ms
18,656 KB
testcase_11 AC 52 ms
20,580 KB
testcase_12 AC 52 ms
20,636 KB
testcase_13 AC 52 ms
20,576 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    public static void Main()
    {
        var s = Console.ReadLine().Trim();
        var count = 0; var cmax = 0;
        if (s[0] == '…') { count++; cmax = 1; }
        for (int i = 1; i < s.Length; i++)
            if (s[i] == '…')
            {
                count++;
                cmax = Math.Max(cmax, count);
            }
            else count = 0;
        Console.WriteLine(cmax);
    }
}
0