結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー kmtrc130kmtrc130
提出日時 2017-06-02 15:08:15
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 614 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 107,564 KB
実行使用メモリ 27,448 KB
最終ジャッジ日時 2024-09-21 22:12:56
合計ジャッジ時間 1,985 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 11 WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
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;

class Program
{
    static void Main(string[] args)
    {
        string[] AB = new string[2];
        AB[0] = Console.ReadLine();
        AB[1] = Console.ReadLine();

        bool isOK = false;
        int chkNumeric = 0;

        foreach (string chkString in AB)
        {
            isOK = false;

            if (!int.TryParse(chkString, out chkNumeric)) { break; }
            if (1 < chkString.Length && chkString.Substring(0, 1) == "0") { break; }
            isOK = true;
        }
        Console.WriteLine(isOK ? "OK" : "NG");
    }
}
0