結果

問題 No.791 うし数列
ユーザー kekuremakekurema
提出日時 2019-03-15 17:30:06
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 55 ms / 2,000 ms
コード長 665 bytes
コンパイル時間 2,058 ms
コンパイル使用メモリ 100,056 KB
実行使用メモリ 22,504 KB
最終ジャッジ日時 2023-09-14 12:35:08
合計ジャッジ時間 3,872 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
20,496 KB
testcase_01 AC 54 ms
20,404 KB
testcase_02 AC 54 ms
18,528 KB
testcase_03 AC 53 ms
20,648 KB
testcase_04 AC 52 ms
22,468 KB
testcase_05 AC 54 ms
20,488 KB
testcase_06 AC 53 ms
20,476 KB
testcase_07 AC 53 ms
18,444 KB
testcase_08 AC 52 ms
22,504 KB
testcase_09 AC 53 ms
20,480 KB
testcase_10 AC 55 ms
22,476 KB
testcase_11 AC 53 ms
20,536 KB
testcase_12 AC 51 ms
20,496 KB
testcase_13 AC 52 ms
20,516 KB
testcase_14 AC 52 ms
20,420 KB
testcase_15 AC 52 ms
20,548 KB
testcase_16 AC 53 ms
20,568 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.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace contest
{
    class Program
    {
        static void Main(string[] args)
        {
            string E = Console.ReadLine();
            int len = E.Length;
            int i = -1;
            if (E[0] == '1' && len >= 2) 
            {
                int t;
                for (t = 1; t < E.Length; t++)
                {
                    if (E[t] != '3') break;
                }
                if (t == E.Length) i = E.Length - 1;
                else i = -1;
            }

            Console.WriteLine(i);
        }
    }
}
0