結果

問題 No.131 マンハッタン距離
ユーザー d_nishiyama85d_nishiyama85
提出日時 2015-06-09 08:39:44
言語 Haskell
(9.8.2)
結果
WA  
実行時間 -
コード長 165 bytes
コンパイル時間 7,068 ms
コンパイル使用メモリ 157,544 KB
実行使用メモリ 7,152 KB
最終ジャッジ日時 2023-09-20 20:07:59
合計ジャッジ時間 14,144 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,840 KB
testcase_01 WA -
testcase_02 AC 2 ms
6,824 KB
testcase_03 AC 212 ms
7,032 KB
testcase_04 AC 152 ms
6,924 KB
testcase_05 AC 122 ms
6,992 KB
testcase_06 AC 31 ms
7,084 KB
testcase_07 AC 2 ms
6,824 KB
testcase_08 AC 3 ms
6,816 KB
testcase_09 AC 2 ms
7,032 KB
testcase_10 AC 3 ms
6,984 KB
testcase_11 AC 2 ms
6,992 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 3 ms
7,060 KB
testcase_15 AC 2 ms
6,980 KB
testcase_16 AC 3 ms
7,028 KB
testcase_17 WA -
testcase_18 AC 3 ms
6,996 KB
testcase_19 AC 3 ms
6,916 KB
testcase_20 AC 3 ms
7,012 KB
testcase_21 AC 3 ms
6,956 KB
testcase_22 AC 3 ms
6,988 KB
testcase_23 AC 1,512 ms
7,012 KB
testcase_24 WA -
testcase_25 AC 1,391 ms
6,972 KB
testcase_26 AC 1,393 ms
7,048 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 <= b) [0..abs(a)]


readInt :: String -> Int
readInt = read
0