結果
問題 | No.51 やる気の問題 |
ユーザー | shikatsusan |
提出日時 | 2016-05-19 16:07:39 |
言語 | Haskell (9.8.2) |
結果 |
AC
|
実行時間 | 39 ms / 5,000 ms |
コード長 | 236 bytes |
コンパイル時間 | 5,213 ms |
コンパイル使用メモリ | 174,976 KB |
実行使用メモリ | 24,960 KB |
最終ジャッジ日時 | 2024-04-16 01:23:14 |
合計ジャッジ時間 | 5,786 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
5,248 KB |
testcase_01 | AC | 1 ms
5,376 KB |
testcase_02 | AC | 2 ms
5,376 KB |
testcase_03 | AC | 2 ms
5,376 KB |
testcase_04 | AC | 2 ms
5,376 KB |
testcase_05 | AC | 30 ms
21,120 KB |
testcase_06 | AC | 14 ms
14,080 KB |
testcase_07 | AC | 14 ms
14,208 KB |
testcase_08 | AC | 10 ms
11,264 KB |
testcase_09 | AC | 39 ms
24,704 KB |
testcase_10 | AC | 11 ms
12,800 KB |
testcase_11 | AC | 11 ms
12,160 KB |
testcase_12 | AC | 21 ms
17,152 KB |
testcase_13 | AC | 26 ms
19,200 KB |
testcase_14 | AC | 13 ms
13,568 KB |
testcase_15 | AC | 34 ms
21,120 KB |
testcase_16 | AC | 7 ms
9,472 KB |
testcase_17 | AC | 4 ms
5,504 KB |
testcase_18 | AC | 35 ms
22,272 KB |
testcase_19 | AC | 36 ms
22,400 KB |
testcase_20 | AC | 16 ms
14,848 KB |
testcase_21 | AC | 4 ms
5,760 KB |
testcase_22 | AC | 39 ms
24,960 KB |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) Main.hs:9:33: warning: [GHC-47082] [-Woperator-whitespace-ext-conflict] The prefix use of a ‘$’ would denote an untyped splice were the TemplateHaskell extension enabled. Suggested fix: Add whitespace after the ‘$’. | 9 | print . snd . foldl' f1 (w,0) $[d,(d-1)..1] | ^ [2 of 2] Linking a.out
ソースコード
import Data.Foldable main::IO() main = do w <-fmap read getLine d <-fmap read getLine let f1 (w,r) d = (w-amt,amt) where amt = truncate $ fromIntegral w / fromIntegral(d*d) print . snd . foldl' f1 (w,0) $[d,(d-1)..1]