結果

問題 No.791 うし数列
ユーザー pofpof
提出日時 2019-05-22 16:19:20
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 446 bytes
コンパイル時間 759 ms
コンパイル使用メモリ 105,520 KB
実行使用メモリ 28,600 KB
最終ジャッジ日時 2023-10-17 11:17:49
合計ジャッジ時間 2,542 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
28,588 KB
testcase_01 AC 60 ms
28,592 KB
testcase_02 AC 61 ms
28,592 KB
testcase_03 AC 56 ms
28,468 KB
testcase_04 AC 61 ms
28,588 KB
testcase_05 AC 57 ms
28,468 KB
testcase_06 AC 56 ms
28,468 KB
testcase_07 AC 60 ms
28,584 KB
testcase_08 AC 60 ms
28,588 KB
testcase_09 AC 60 ms
28,584 KB
testcase_10 AC 60 ms
28,584 KB
testcase_11 AC 60 ms
28,584 KB
testcase_12 AC 60 ms
28,588 KB
testcase_13 AC 60 ms
28,580 KB
testcase_14 AC 61 ms
28,588 KB
testcase_15 AC 60 ms
28,580 KB
testcase_16 AC 60 ms
28,600 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Text.RegularExpressions;

namespace ConsoleApp2
{
    class Program
    {
        static void Main(string[] args)
        {
            string n = Console.ReadLine();
            Match m = Regex.Match(n, "^13+$");
            if (m.Success)
            {
                Console.WriteLine(m.Length-1);
            }
            else
            {
                Console.WriteLine(-1);
            }

        }
    }
}
0