結果

問題 No.203 ゴールデン・ウィーク(1)
ユーザー fujitafujita
提出日時 2023-05-09 11:41:34
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 48 ms / 1,000 ms
コード長 1,415 bytes
コンパイル時間 9,011 ms
コンパイル使用メモリ 145,072 KB
実行使用メモリ 161,012 KB
最終ジャッジ日時 2023-08-17 05:19:42
合計ジャッジ時間 9,883 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
26,092 KB
testcase_01 AC 47 ms
26,160 KB
testcase_02 AC 47 ms
28,336 KB
testcase_03 AC 46 ms
26,180 KB
testcase_04 AC 48 ms
26,384 KB
testcase_05 AC 47 ms
26,092 KB
testcase_06 AC 47 ms
26,016 KB
testcase_07 AC 46 ms
26,264 KB
testcase_08 AC 47 ms
28,372 KB
testcase_09 AC 46 ms
26,388 KB
testcase_10 AC 46 ms
26,392 KB
testcase_11 AC 47 ms
26,416 KB
testcase_12 AC 46 ms
26,348 KB
testcase_13 AC 46 ms
26,480 KB
testcase_14 AC 45 ms
26,268 KB
testcase_15 AC 46 ms
28,224 KB
testcase_16 AC 45 ms
26,264 KB
testcase_17 AC 47 ms
26,400 KB
testcase_18 AC 46 ms
26,144 KB
testcase_19 AC 45 ms
26,392 KB
testcase_20 AC 46 ms
26,344 KB
testcase_21 AC 47 ms
25,988 KB
testcase_22 AC 46 ms
26,136 KB
testcase_23 AC 47 ms
26,128 KB
testcase_24 AC 46 ms
26,404 KB
testcase_25 AC 47 ms
26,420 KB
testcase_26 AC 46 ms
26,212 KB
testcase_27 AC 46 ms
26,040 KB
testcase_28 AC 46 ms
161,012 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 188 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;
namespace yukicoder
{
    class Program
    {

        static void Main(string[] args)
        {
            var str = Console.ReadLine();

            var str2 = Console.ReadLine();
            int temp = 0;
            string[] strings = new string[str.Length + str.Length];
            int vacation = 1, Maxvacation = 0;
            for(int i = 0; i < str.Length; i++)
            {
                strings[i] = str.Substring(i , 1);
                strings[i + 7] = str2.Substring(i, 1);
            }
            for (int j = 0; j < strings.Length - 1; j++)
            {
                if (strings[j] == "o" && strings[j + 1] == "o" || vacation > Maxvacation && j == 12)
                {
                    vacation++;
                    if (vacation > Maxvacation && j == 12)
                    {
                        Maxvacation = vacation;
                    }
                }
                
                
                else
                {
                    temp = vacation;
                    if(temp > Maxvacation  )
                    {
                        Maxvacation = temp;
                    }                   
                    vacation = 1;
                }
            }
            if(str == "xxxxxxx" && str2 == "xxxxxxx")
            {
                Maxvacation = 0;
            }
            Console.WriteLine(Maxvacation);
        }
    }
}
0