結果

問題 No.791 うし数列
ユーザー curryudon08curryudon08
提出日時 2020-06-15 01:38:38
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 367 bytes
コンパイル時間 2,060 ms
コンパイル使用メモリ 106,040 KB
実行使用メモリ 23,664 KB
最終ジャッジ日時 2023-09-10 19:27:45
合計ジャッジ時間 4,067 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
23,504 KB
testcase_01 AC 56 ms
21,636 KB
testcase_02 WA -
testcase_03 AC 57 ms
23,584 KB
testcase_04 AC 54 ms
23,356 KB
testcase_05 AC 56 ms
21,440 KB
testcase_06 AC 57 ms
23,660 KB
testcase_07 AC 56 ms
21,528 KB
testcase_08 AC 54 ms
19,444 KB
testcase_09 AC 56 ms
21,740 KB
testcase_10 AC 56 ms
21,648 KB
testcase_11 AC 56 ms
21,340 KB
testcase_12 AC 54 ms
23,552 KB
testcase_13 AC 54 ms
23,468 KB
testcase_14 AC 53 ms
21,620 KB
testcase_15 AC 54 ms
23,588 KB
testcase_16 AC 53 ms
21,524 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';
            var f2 = s.Skip(1).All(c => c == '3');

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