結果

問題 No.495 (^^*) Easy
ユーザー fujitafujita
提出日時 2023-05-10 15:23:46
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 1,076 bytes
コンパイル時間 11,895 ms
コンパイル使用メモリ 147,548 KB
実行使用メモリ 181,880 KB
最終ジャッジ日時 2023-08-17 20:31:00
合計ジャッジ時間 12,956 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
28,344 KB
testcase_01 AC 46 ms
26,428 KB
testcase_02 AC 47 ms
28,412 KB
testcase_03 AC 46 ms
26,288 KB
testcase_04 AC 46 ms
26,452 KB
testcase_05 AC 50 ms
28,192 KB
testcase_06 AC 80 ms
181,880 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 151 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();
            string[] strings = new string[str.Length];
            int L = 0 , R = 0;
            
            
            for(int i = 0; i < str.Length; i++)
            {
                if (str.Substring(0, 1) == "#" || str.Substring(1, 1) == "#" || str.Substring(2, 1) == "#" ||
                str.Substring(3, 1) == "#" || str.Substring(4, 1) == "#")
                {
                    Console.WriteLine(L + " " + R);
                    break;
                }
                else if(str.Substring(i, 5) == "(^^*)")
                {
                    L++;
                }
                else if(str.Substring(i, 5) == "(*^^)")
                {
                    R++;
                }
                else if(str.Substring(i + 4, 1) == "#")
                {
                    Console.WriteLine(L + " " + R);
                    break;
                }
            }
            
        }
    }
}
0