結果

問題 No.341 沈黙の期間
ユーザー Kaz_nlKaz_nl
提出日時 2017-09-05 21:27:45
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 53 ms / 5,000 ms
コード長 393 bytes
コンパイル時間 3,769 ms
コンパイル使用メモリ 105,044 KB
実行使用メモリ 22,544 KB
最終ジャッジ日時 2023-08-06 19:26:01
合計ジャッジ時間 5,469 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
20,440 KB
testcase_01 AC 52 ms
20,512 KB
testcase_02 AC 52 ms
20,488 KB
testcase_03 AC 52 ms
20,368 KB
testcase_04 AC 51 ms
18,492 KB
testcase_05 AC 51 ms
20,504 KB
testcase_06 AC 52 ms
18,280 KB
testcase_07 AC 53 ms
20,488 KB
testcase_08 AC 52 ms
20,640 KB
testcase_09 AC 52 ms
20,472 KB
testcase_10 AC 52 ms
22,544 KB
testcase_11 AC 52 ms
22,532 KB
testcase_12 AC 52 ms
20,380 KB
testcase_13 AC 51 ms
20,428 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

class Program
{
    static void Main()
    {
        string s = Console.ReadLine();
        int cnt = 0, ans = 0;
        foreach (var item in s)
        {
            if (item == '…')
            {
                ans = Math.Max(ans, ++cnt);
            }
            else
            {
                cnt = 0;
            }
        }
        Console.WriteLine(ans);
    }
}
0