結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー kokatsu
提出日時 2022-03-28 21:45:21
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 421 bytes
コンパイル時間 1,337 ms
コンパイル使用メモリ 176,308 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-22 14:43:17
合計ジャッジ時間 1,944 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import std;

void main() {
    auto A = readln.chomp;
    auto B = readln.chomp;

    bool isOK = true;

    isOK &= A.isNumeric;
    isOK &= B.isNumeric;

    isOK &= !(A.length > 1 && A.front == '0');
    isOK &= !(B.length > 1 && B.front == '0');

    if (isOK) {
        auto a = A.to!int, b = B.to!int;
        int l = 12345;

        isOK &= a <= l;
        isOK &= b <= l;
    }

    writeln(isOK ? "OK" : "NG");
}
0