結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー hum_ophum_op
提出日時 2017-04-17 09:07:22
言語 F#
(F# 4.0)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 643 bytes
コンパイル時間 3,734 ms
コンパイル使用メモリ 163,412 KB
実行使用メモリ 24,424 KB
最終ジャッジ日時 2023-09-26 10:26:33
合計ジャッジ時間 5,840 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
22,080 KB
testcase_01 AC 62 ms
24,132 KB
testcase_02 AC 62 ms
22,208 KB
testcase_03 AC 67 ms
24,388 KB
testcase_04 AC 62 ms
22,084 KB
testcase_05 AC 62 ms
22,132 KB
testcase_06 AC 66 ms
24,408 KB
testcase_07 AC 61 ms
22,204 KB
testcase_08 AC 67 ms
22,300 KB
testcase_09 AC 62 ms
22,168 KB
testcase_10 AC 62 ms
24,124 KB
testcase_11 AC 61 ms
24,184 KB
testcase_12 AC 67 ms
24,424 KB
testcase_13 AC 67 ms
24,420 KB
testcase_14 AC 67 ms
22,280 KB
testcase_15 AC 67 ms
24,364 KB
testcase_16 AC 66 ms
22,296 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

open System

let No446 () = 
    let A = Console.ReadLine()
    let B = Console.ReadLine()

    let rec checkNum (S : String) (n : int) =
        if n = S.Length then
            true
        else if n = 0 && S.[n] = '0' && S.Length <> 1 then
            false
        else if S.[n] >= '0' && S.[n] <= '9' then
            checkNum S (n + 1)
        else 
            false
    if checkNum A 0 && checkNum B 0 then
        let A = int <| A
        let B = int <| B
        if (A >= 0 && A <= 12345) && (B >= 0 && B <= 12345) then 
            printfn "OK"
        else 
            printfn "NG"

    else
        printfn "NG"

    ()

No446 ()
0