結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー hum_ophum_op
提出日時 2017-04-17 09:01:32
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 483 bytes
コンパイル時間 5,235 ms
コンパイル使用メモリ 159,268 KB
実行使用メモリ 24,288 KB
最終ジャッジ日時 2023-09-26 10:21:09
合計ジャッジ時間 7,240 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
22,184 KB
testcase_01 AC 61 ms
24,244 KB
testcase_02 AC 62 ms
22,200 KB
testcase_03 AC 62 ms
24,248 KB
testcase_04 AC 61 ms
24,196 KB
testcase_05 AC 61 ms
22,080 KB
testcase_06 WA -
testcase_07 AC 62 ms
24,256 KB
testcase_08 WA -
testcase_09 AC 61 ms
22,200 KB
testcase_10 AC 62 ms
24,240 KB
testcase_11 AC 61 ms
22,228 KB
testcase_12 AC 64 ms
24,240 KB
testcase_13 AC 62 ms
22,300 KB
testcase_14 AC 62 ms
22,136 KB
testcase_15 AC 62 ms
20,144 KB
testcase_16 AC 62 ms
22,276 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
        printfn "OK"
    else
        printfn "NG"

    ()

No446 ()
0