結果

問題 No.791 うし数列
ユーザー yurarayurara
提出日時 2019-04-09 23:53:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 2,563 ms
コンパイル使用メモリ 100,272 KB
実行使用メモリ 26,568 KB
最終ジャッジ日時 2023-09-19 04:42:05
合計ジャッジ時間 5,750 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 99 ms
24,436 KB
testcase_01 AC 99 ms
24,436 KB
testcase_02 AC 101 ms
26,568 KB
testcase_03 AC 97 ms
24,376 KB
testcase_04 AC 97 ms
26,524 KB
testcase_05 AC 99 ms
24,172 KB
testcase_06 AC 97 ms
24,264 KB
testcase_07 AC 101 ms
24,544 KB
testcase_08 AC 98 ms
24,264 KB
testcase_09 AC 100 ms
26,472 KB
testcase_10 AC 101 ms
24,540 KB
testcase_11 AC 100 ms
24,420 KB
testcase_12 AC 96 ms
24,528 KB
testcase_13 AC 98 ms
24,620 KB
testcase_14 AC 98 ms
24,404 KB
testcase_15 AC 98 ms
26,380 KB
testcase_16 AC 98 ms
24,580 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;

public class Program
{
    public static void Main()
    {
        var value = Console.ReadLine();

        if (Regex.IsMatch(value, @"^13+$"))
            Console.WriteLine("{0}", value.Length - 1);
        else
            Console.WriteLine("{0}", -1);

        return;
    }
}
0