結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー _matumo__matumo_
提出日時 2018-08-27 08:56:20
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 680 bytes
コンパイル時間 2,507 ms
コンパイル使用メモリ 101,672 KB
実行使用メモリ 23,332 KB
最終ジャッジ日時 2023-09-13 19:30:28
合計ジャッジ時間 4,301 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
21,312 KB
testcase_01 AC 50 ms
21,268 KB
testcase_02 AC 50 ms
21,276 KB
testcase_03 AC 50 ms
21,228 KB
testcase_04 AC 50 ms
21,192 KB
testcase_05 AC 51 ms
23,324 KB
testcase_06 WA -
testcase_07 AC 51 ms
21,240 KB
testcase_08 WA -
testcase_09 AC 49 ms
21,288 KB
testcase_10 AC 50 ms
21,228 KB
testcase_11 AC 50 ms
23,332 KB
testcase_12 AC 50 ms
23,296 KB
testcase_13 AC 52 ms
23,284 KB
testcase_14 AC 50 ms
21,248 KB
testcase_15 AC 50 ms
21,196 KB
testcase_16 AC 50 ms
21,272 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;

namespace YukiCoder
{
    class Program
    {
        static bool IsNum(string S)
        {
            if (S.Any(c => c < '0' || c > '9')) return false;
            if (S.Length == 1)                  return true;
            if (S[0] == '0')                    return false;
            return true;
        }

        static void Main(string[] args)
        {
            string a = Console.ReadLine();
            string b = Console.ReadLine();
            string S = (IsNum(a) && IsNum(b)) ? "OK" : "NG";
            Console.WriteLine(S);
            Console.ReadLine();
        }
    }
}
0