結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-08-29 02:45:33
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 618 bytes
コンパイル時間 2,533 ms
コンパイル使用メモリ 103,428 KB
実行使用メモリ 23,924 KB
最終ジャッジ日時 2023-09-26 07:09:10
合計ジャッジ時間 5,098 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
21,788 KB
testcase_01 AC 56 ms
19,612 KB
testcase_02 AC 52 ms
21,328 KB
testcase_03 AC 57 ms
23,800 KB
testcase_04 AC 57 ms
21,684 KB
testcase_05 AC 57 ms
23,804 KB
testcase_06 AC 57 ms
23,792 KB
testcase_07 AC 57 ms
21,848 KB
testcase_08 AC 56 ms
19,920 KB
testcase_09 AC 57 ms
21,956 KB
testcase_10 AC 57 ms
23,924 KB
testcase_11 AC 52 ms
21,312 KB
testcase_12 AC 57 ms
21,912 KB
testcase_13 AC 56 ms
21,964 KB
testcase_14 AC 58 ms
21,756 KB
testcase_15 AC 58 ms
21,744 KB
testcase_16 AC 57 ms
21,908 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;

class No446
{
    static void Main()
    {
        var IsTrue = true;
        for (int i = 0; i < 2; ++i)
        {
            var str = Console.ReadLine();
            if (str.All(x => char.IsNumber(x)))
            {
                var firstNum = Int32.Parse(str);
                IsTrue = firstNum <= 12345;
                if (!IsTrue) break;
                IsTrue = (int)Math.Log10(firstNum == 0 ? 1 : firstNum) + 1 == str.Count();
            }
            else IsTrue = false;
            if(!IsTrue) break;
        }
        Console.WriteLine(IsTrue ? "OK" : "NG");
    }
}
0