結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-08-29 02:43:03
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 654 bytes
コンパイル時間 4,176 ms
コンパイル使用メモリ 106,804 KB
実行使用メモリ 23,832 KB
最終ジャッジ日時 2023-09-26 06:50:57
合計ジャッジ時間 5,476 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
21,840 KB
testcase_01 AC 56 ms
23,528 KB
testcase_02 AC 50 ms
23,364 KB
testcase_03 AC 55 ms
21,768 KB
testcase_04 AC 56 ms
23,832 KB
testcase_05 AC 57 ms
23,712 KB
testcase_06 AC 56 ms
23,708 KB
testcase_07 WA -
testcase_08 AC 55 ms
21,808 KB
testcase_09 WA -
testcase_10 AC 56 ms
23,756 KB
testcase_11 AC 50 ms
19,212 KB
testcase_12 AC 57 ms
21,932 KB
testcase_13 AC 55 ms
23,752 KB
testcase_14 AC 55 ms
19,684 KB
testcase_15 AC 56 ms
19,856 KB
testcase_16 AC 56 ms
21,808 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;
                break;
            }
        }
        Console.WriteLine(IsTrue ? "OK" : "NG");
    }
}
0