結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
20,528 KB
testcase_01 WA -
testcase_02 AC 49 ms
18,536 KB
testcase_03 AC 49 ms
20,556 KB
testcase_04 AC 49 ms
20,452 KB
testcase_05 AC 49 ms
18,428 KB
testcase_06 WA -
testcase_07 AC 49 ms
20,528 KB
testcase_08 WA -
testcase_09 AC 49 ms
20,384 KB
testcase_10 AC 49 ms
18,416 KB
testcase_11 AC 49 ms
20,556 KB
testcase_12 AC 50 ms
20,552 KB
testcase_13 AC 49 ms
22,488 KB
testcase_14 AC 49 ms
20,472 KB
testcase_15 AC 49 ms
18,580 KB
testcase_16 AC 49 ms
20,556 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) || (s1[0] == '0' && s1.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