結果
問題 | No.48 ロボットの操縦 |
ユーザー |
|
提出日時 | 2015-04-22 18:27:34 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 372 bytes |
コンパイル時間 | 5,372 ms |
コンパイル使用メモリ | 174,976 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-21 18:18:01 |
合計ジャッジ時間 | 6,163 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
コンパイルメッセージ
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
ソースコード
main = getContents >>= print . solve . map read . linessolve::Int->Intsolve [x, y, l] = a + b + c + d + ewherea = div (abs x) l + if mod (abs x) l == 0 then 0 else 1b = div (abs y) l + if mod (abs y) l == 0 then 0 else 1c = if y < 0 then 1 else 0d = if x == 0 then 0 else 1e = if x == 0 && y < 0 then 1 else 0