結果

問題 No.446 ゆきこーだーの雨と雪 (1)
ユーザー e7a894e7a894
提出日時 2018-05-24 12:56:48
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 856 ms
コンパイル使用メモリ 156,644 KB
実行使用メモリ 6,908 KB
最終ジャッジ日時 2023-09-11 02:16:50
合計ジャッジ時間 2,110 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,700 KB
testcase_01 WA -
testcase_02 AC 2 ms
6,696 KB
testcase_03 AC 2 ms
6,688 KB
testcase_04 AC 3 ms
6,700 KB
testcase_05 AC 3 ms
6,684 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 2 ms
6,704 KB
testcase_11 AC 3 ms
6,712 KB
testcase_12 AC 3 ms
6,712 KB
testcase_13 AC 3 ms
6,688 KB
testcase_14 AC 3 ms
6,684 KB
testcase_15 AC 3 ms
6,724 KB
testcase_16 AC 2 ms
6,696 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.6.1/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

import Control.Monad

main = do
  [a,b] <- replicateM 2 getLine
  putStrLn $ if judge a && judge b then "OK" else "NG"

judge :: String -> Bool
judge x = (and $ map (`elem` ['0'..'9']) x) && if length x == 1 && head x /= '0' then False else True
0