結果

問題 No.143 豆
ユーザー 34056915823405691582
提出日時 2017-01-18 22:21:15
言語 Haskell
(9.8.2)
結果
AC  
実行時間 3 ms / 1,000 ms
コード長 174 bytes
コンパイル時間 1,857 ms
コンパイル使用メモリ 157,464 KB
実行使用メモリ 7,556 KB
最終ジャッジ日時 2023-09-30 16:55:26
合計ジャッジ時間 2,523 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,176 KB
testcase_01 AC 3 ms
7,360 KB
testcase_02 AC 3 ms
7,304 KB
testcase_03 AC 3 ms
7,292 KB
testcase_04 AC 3 ms
7,456 KB
testcase_05 AC 3 ms
7,424 KB
testcase_06 AC 3 ms
7,444 KB
testcase_07 AC 3 ms
7,556 KB
testcase_08 AC 3 ms
7,416 KB
testcase_09 AC 3 ms
7,428 KB
testcase_10 AC 3 ms
7,388 KB
testcase_11 AC 3 ms
7,232 KB
testcase_12 AC 3 ms
7,256 KB
testcase_13 AC 3 ms
7,428 KB
testcase_14 AC 3 ms
7,476 KB
testcase_15 AC 3 ms
7,476 KB
testcase_16 AC 2 ms
7,064 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 Data.Functor
main = do
  [k,n,_] <- map read . words <$> getLine
  s <- sum . map read . words <$> getLine
  let r = k*n-s
  putStrLn $ show $ if r >= 0 then r else -1
0