結果

問題 No.791 うし数列
ユーザー curryudon08curryudon08
提出日時 2020-06-15 01:39:54
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 384 bytes
コンパイル時間 3,262 ms
コンパイル使用メモリ 106,904 KB
実行使用メモリ 23,584 KB
最終ジャッジ日時 2023-09-10 19:29:36
合計ジャッジ時間 5,228 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
23,432 KB
testcase_01 AC 57 ms
23,584 KB
testcase_02 AC 57 ms
23,476 KB
testcase_03 AC 59 ms
23,488 KB
testcase_04 AC 55 ms
21,432 KB
testcase_05 AC 58 ms
21,384 KB
testcase_06 AC 57 ms
21,612 KB
testcase_07 AC 58 ms
21,476 KB
testcase_08 AC 55 ms
21,524 KB
testcase_09 AC 57 ms
21,440 KB
testcase_10 AC 58 ms
21,500 KB
testcase_11 AC 58 ms
21,620 KB
testcase_12 AC 55 ms
21,360 KB
testcase_13 AC 56 ms
19,456 KB
testcase_14 AC 55 ms
21,436 KB
testcase_15 AC 56 ms
23,416 KB
testcase_16 AC 55 ms
21,436 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.Linq;

namespace _0791
{
    class Program
    {
        static void Main(string[] args)
        {
            var s = Console.ReadLine().ToCharArray().ToArray();
            
            var f1 = s[0] == '1' && s.Length >= 2;
            var f2 = s.Skip(1).All(c => c == '3');

            Console.WriteLine(f1 && f2 ? s.Length - 1: -1);
        }
    }
}
0