結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー mencottonmencotton
提出日時 2017-12-30 17:09:04
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 688 bytes
コンパイル時間 2,139 ms
コンパイル使用メモリ 103,912 KB
実行使用メモリ 22,636 KB
最終ジャッジ日時 2023-08-23 11:05:00
合計ジャッジ時間 3,678 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
20,644 KB
testcase_01 AC 49 ms
20,584 KB
testcase_02 AC 49 ms
20,548 KB
testcase_03 AC 49 ms
20,592 KB
testcase_04 AC 49 ms
20,484 KB
testcase_05 AC 50 ms
22,604 KB
testcase_06 WA -
testcase_07 AC 49 ms
20,540 KB
testcase_08 WA -
testcase_09 AC 49 ms
22,520 KB
testcase_10 AC 49 ms
22,636 KB
testcase_11 AC 50 ms
22,516 KB
testcase_12 AC 50 ms
20,536 KB
testcase_13 AC 50 ms
22,460 KB
testcase_14 AC 49 ms
20,488 KB
testcase_15 AC 50 ms
22,616 KB
testcase_16 AC 49 ms
20,468 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;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            string s1 = Console.ReadLine();
            string s2 = Console.ReadLine();
            bool flag = !((s1[0] == '0' && s1.Length != 1) || (s2[0] == '0' && s2.Length != 1));
            for (int i = 0; i < s1.Length; i++)
            {
                if (s1[i] < '0' || '9' < s1[i]) flag = false;
            }
            for (int i = 0; i < s2.Length; i++)
            {
                if (s2[i] < '0' || '9' < s2[i]) flag = false;
            }
            Console.WriteLine(flag ? "OK" : "NG");
        }
    }
}
0