結果

問題 No.2298 yukicounter
ユーザー bluemeganebluemegane
提出日時 2023-05-13 15:27:04
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 506 bytes
コンパイル時間 1,246 ms
コンパイル使用メモリ 63,100 KB
実行使用メモリ 25,524 KB
最終ジャッジ日時 2023-08-19 14:36:18
合計ジャッジ時間 5,018 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
20,492 KB
testcase_01 AC 49 ms
20,480 KB
testcase_02 AC 51 ms
22,612 KB
testcase_03 AC 69 ms
25,524 KB
testcase_04 AC 61 ms
21,652 KB
testcase_05 AC 58 ms
20,920 KB
testcase_06 AC 75 ms
25,040 KB
testcase_07 AC 61 ms
19,460 KB
testcase_08 AC 58 ms
20,848 KB
testcase_09 AC 59 ms
21,220 KB
testcase_10 AC 57 ms
22,564 KB
testcase_11 AC 59 ms
21,580 KB
testcase_12 AC 60 ms
23,452 KB
testcase_13 AC 62 ms
23,496 KB
testcase_14 AC 63 ms
19,500 KB
testcase_15 AC 57 ms
20,476 KB
testcase_16 AC 58 ms
20,892 KB
testcase_17 AC 58 ms
22,884 KB
testcase_18 AC 50 ms
20,488 KB
testcase_19 AC 50 ms
22,596 KB
testcase_20 AC 50 ms
20,412 KB
testcase_21 AC 51 ms
22,648 KB
testcase_22 AC 61 ms
21,652 KB
testcase_23 AC 60 ms
21,600 KB
testcase_24 AC 74 ms
25,008 KB
testcase_25 AC 65 ms
22,912 KB
testcase_26 AC 61 ms
21,372 KB
testcase_27 AC 70 ms
23,940 KB
testcase_28 AC 60 ms
21,212 KB
testcase_29 AC 59 ms
21,128 KB
testcase_30 AC 56 ms
18,452 KB
testcase_31 AC 58 ms
20,940 KB
testcase_32 AC 60 ms
23,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using static System.Math;
using System;

public class Hello
{
    static void Main()
    {
        var s = Console.ReadLine().Trim();
        getAns(s);
    }
    static void getAns(string s)
    {
        var s2 = s.Replace("yukicoder", "@");
        var n = s2.Length;
        var ans = 0;
        var c = 0;
        foreach (var x in s2)
        {
            if (x == '@') c++;
            else { ans = Max(ans, c); c = 0; }
        }
        ans = Max(ans, c);
        Console.WriteLine(ans);
    }
}
0