結果

問題 No.791 うし数列
ユーザー bluemeganebluemegane
提出日時 2019-02-22 22:21:28
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 336 bytes
コンパイル時間 2,348 ms
コンパイル使用メモリ 100,068 KB
実行使用メモリ 22,664 KB
最終ジャッジ日時 2023-08-16 19:32:05
合計ジャッジ時間 4,291 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
22,664 KB
testcase_01 AC 55 ms
22,500 KB
testcase_02 WA -
testcase_03 AC 53 ms
20,524 KB
testcase_04 AC 54 ms
22,496 KB
testcase_05 AC 53 ms
18,400 KB
testcase_06 AC 53 ms
20,500 KB
testcase_07 AC 53 ms
20,704 KB
testcase_08 AC 52 ms
20,696 KB
testcase_09 AC 55 ms
22,560 KB
testcase_10 AC 55 ms
22,544 KB
testcase_11 AC 55 ms
20,612 KB
testcase_12 AC 53 ms
20,456 KB
testcase_13 AC 53 ms
20,536 KB
testcase_14 AC 53 ms
22,524 KB
testcase_15 AC 53 ms
20,596 KB
testcase_16 AC 53 ms
22,612 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

public class Hello
{
    static void Main()
    {
        var s = Console.ReadLine().Trim();
        Console.WriteLine(getAns(s));
    }
    static long getAns(string s)
    {
        var sL = s.Length;
        if (s[0] != '1') return -1;
        if (s.Replace("3", "") != "1") return -1;
        return sL - 1;
    }
}

0