結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー Johnny
提出日時 2017-02-11 01:45:03
言語 Haskell
(9.10.1)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 4,843 ms
コンパイル使用メモリ 176,852 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-29 11:49:55
合計ジャッジ時間 2,444 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 11 WA * 2
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )

Main.hs:9:1: warning: [GHC-94817] [-Wtabs]
    Tab character found here, and in two further locations.
    Suggested fix: Please use spaces instead.
  |
9 |         where ja = judge a
  | ^^^^^^^^
[2 of 2] Linking a.out

ソースコード

diff #

import Data.Char

isNum [] = True
isNum (a:as) = if (isDigit a) then (isNum as) else False

judge a = (isNum a) && ((read a) <= 12345)

f a b = if j == True then "OK" else "NG"
	where ja = judge a
	      jb = judge b
	      j = (ja == True) && (jb == True)

main = do
  a <- getLine
  b <- getLine
  putStrLn $ f a b
0