結果

問題 No.734 Careful Engineer
ユーザー SamuSoft
提出日時 2018-09-30 01:24:09
言語 Haskell
(9.10.1)
結果
WA  
実行時間 -
コード長 377 bytes
コンパイル時間 5,487 ms
コンパイル使用メモリ 175,488 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-12 08:57:18
合計ジャッジ時間 6,101 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 9 WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default
[1 of 2] Compiling Main             ( Main.hs, Main.o )
[2 of 2] Linking a.out

ソースコード

diff #

main :: IO()
main = getContents >>= putStrLn . show . listToValue . (map readDouble) . words


readDouble :: [Char] -> Int
readDouble = read

hours :: Int -> Int
hours x = x * 3600

minutes :: Int -> Int
minutes x = x * 60

listToValue :: [Int] -> Int
listToValue (x:y:z:_)
  | result < 0 = -1
  | otherwise = result
  where
    result = 1 + (div (hours z) $ (minutes x) - y)
0