結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー mbanmban
提出日時 2016-11-24 23:09:42
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 946 bytes
コンパイル時間 709 ms
コンパイル使用メモリ 104,448 KB
実行使用メモリ 17,536 KB
最終ジャッジ日時 2024-05-05 13:08:58
合計ジャッジ時間 1,636 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
17,152 KB
testcase_01 AC 18 ms
17,152 KB
testcase_02 AC 22 ms
17,536 KB
testcase_03 AC 19 ms
17,536 KB
testcase_04 AC 18 ms
17,152 KB
testcase_05 AC 18 ms
17,408 KB
testcase_06 AC 21 ms
17,536 KB
testcase_07 AC 20 ms
17,152 KB
testcase_08 AC 20 ms
17,536 KB
testcase_09 AC 20 ms
17,152 KB
testcase_10 AC 19 ms
17,280 KB
testcase_11 AC 19 ms
17,280 KB
testcase_12 AC 19 ms
17,536 KB
testcase_13 AC 19 ms
17,536 KB
testcase_14 AC 19 ms
17,536 KB
testcase_15 AC 19 ms
17,536 KB
testcase_16 AC 19 ms
17,536 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;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;

public class Magatro
{
    static string A, B;
    static void Main()
    {
        string abc = "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
        A = Console.ReadLine();
        B = Console.ReadLine();
        for(int i = 0; i < 26 * 2; i++)
        {
            if (A.IndexOf(abc[i]) >= 0|| B.IndexOf(abc[i]) >= 0)
            {
                Console.WriteLine("NG");
                return;
            }
        }
        if ((A[0] == '0'&&A!="0") || (B[0] == '0' && B != "0"))
        {
            Console.WriteLine("NG");
            return;
        }
        if (int.Parse(A) > 12345 || int.Parse(B) > 12345)
        {
            Console.WriteLine("NG");
            return;
        }
        Console.WriteLine("OK");
    }
  
}


0