結果

問題 No.131 マンハッタン距離
ユーザー d_nishiyama85d_nishiyama85
提出日時 2015-06-09 08:41:02
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 170 bytes
コンパイル時間 10,200 ms
コンパイル使用メモリ 157,244 KB
実行使用メモリ 7,184 KB
最終ジャッジ日時 2023-09-20 20:08:19
合計ジャッジ時間 5,218 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,832 KB
testcase_01 WA -
testcase_02 AC 3 ms
6,880 KB
testcase_03 AC 121 ms
7,112 KB
testcase_04 AC 92 ms
7,052 KB
testcase_05 AC 72 ms
7,092 KB
testcase_06 AC 22 ms
7,092 KB
testcase_07 AC 2 ms
6,912 KB
testcase_08 AC 2 ms
6,888 KB
testcase_09 AC 3 ms
7,056 KB
testcase_10 AC 2 ms
6,988 KB
testcase_11 AC 2 ms
7,088 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 2 ms
6,988 KB
testcase_15 AC 2 ms
7,040 KB
testcase_16 AC 3 ms
6,992 KB
testcase_17 WA -
testcase_18 AC 2 ms
6,980 KB
testcase_19 AC 3 ms
7,088 KB
testcase_20 AC 2 ms
7,040 KB
testcase_21 AC 3 ms
7,008 KB
testcase_22 AC 3 ms
7,088 KB
testcase_23 AC 762 ms
7,032 KB
testcase_24 WA -
testcase_25 AC 772 ms
7,092 KB
testcase_26 AC 772 ms
7,052 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 #

main = do
  cs <- getLine
  let [a, b, d] = map readInt $ words cs
  print $ length $ filter (\x -> d - x <= abs(b)) [0..abs(a)]


readInt :: String -> Int
readInt = read
0