結果

問題 No.345 最小チワワ問題
ユーザー cccccc
提出日時 2022-08-11 22:51:30
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 961 bytes
コンパイル時間 6,870 ms
コンパイル使用メモリ 156,720 KB
実行使用メモリ 184,500 KB
最終ジャッジ日時 2023-10-22 04:13:59
合計ジャッジ時間 13,305 ms
ジャッジサーバーID
(参考情報)
judge9 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
33,132 KB
testcase_01 AC 93 ms
33,132 KB
testcase_02 AC 91 ms
33,120 KB
testcase_03 AC 92 ms
33,120 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 94 ms
33,164 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 WA -
testcase_15 AC 91 ms
33,164 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 92 ms
33,164 KB
testcase_20 AC 90 ms
33,176 KB
testcase_21 RE -
testcase_22 AC 92 ms
33,144 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 RE -
testcase_29 WA -
testcase_30 WA -
testcase_31 RE -
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (105 ms)。
MSBuild のバージョン 17.7.3+8ec440e68 (.NET)
  main -> /home/judge/data/code/bin/Release/net7.0/main.dll
  main -> /home/judge/data/code/bin/Release/net7.0/publish/

ソースコード

diff #

using System;
using System.Linq;
using System.Collections.Generic;

class Program
{
    static void Main()
    {
        var inp = Console.ReadLine();
        var indexC = inp.IndexOf("c");
        var indexW1 = inp.IndexOf("w", indexC);
        var indexW2 = inp.IndexOf("w", indexW1 + 1);
        //Console.WriteLine(indexC);
        //Console.WriteLine(indexW1);
        //Console.WriteLine(indexW2);

        if (indexC == 0)
        {
            var extractionString = inp.Substring(indexC, indexW2);
            var ans = extractionString.Count();
            Console.WriteLine(ans + 1);

        }
        else
        {
            var extractionString = inp.Substring(indexC, indexW2 - indexC);
            var ans = extractionString.Count();
            Console.WriteLine(ans + 1);
        }
    }
    public void CheckStrChiwawa(string chiwawa)
    {
    }
}

/*
ilovechiwawa
wachiwachi
chiwaaaaaaamikawayadeeeeesu
wcwcwcwcwcwcwcwcwcwcwc
ccwwccw
 */
0