結果

問題 No.341 沈黙の期間
ユーザー AreTrashAreTrash
提出日時 2016-04-19 13:23:19
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 52 ms / 5,000 ms
コード長 494 bytes
コンパイル時間 2,149 ms
コンパイル使用メモリ 102,384 KB
実行使用メモリ 22,664 KB
最終ジャッジ日時 2023-07-27 16:27:27
合計ジャッジ時間 3,759 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

using System;

namespace No341_1{
    public class Program{
        public static void Main(string[] args){
            var str = Console.ReadLine();
            var cnt = 0;
            var ans = 0;

            foreach(var c in str){
                if(c == '…'){
                    cnt++;
                }else{
                    ans = Math.Max(ans, cnt);
                    cnt = 0;
                }
            }

            Console.WriteLine(Math.Max(ans, cnt));
        }
    }
}
0