結果
問題 | No.51 やる気の問題 |
ユーザー | po6l55y36 |
提出日時 | 2016-08-19 00:12:39 |
言語 | Haskell (9.6.2) |
結果 |
AC
|
実行時間 | 32 ms / 5,000 ms |
コード長 | 341 bytes |
コンパイル時間 | 1,099 ms |
コンパイル使用メモリ | 159,992 KB |
実行使用メモリ | 21,916 KB |
最終ジャッジ日時 | 2023-08-07 15:19:32 |
合計ジャッジ時間 | 2,661 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,896 KB |
testcase_01 | AC | 2 ms
6,984 KB |
testcase_02 | AC | 3 ms
6,892 KB |
testcase_03 | AC | 3 ms
7,632 KB |
testcase_04 | AC | 3 ms
7,132 KB |
testcase_05 | AC | 23 ms
16,484 KB |
testcase_06 | AC | 12 ms
13,376 KB |
testcase_07 | AC | 12 ms
13,140 KB |
testcase_08 | AC | 7 ms
10,392 KB |
testcase_09 | AC | 32 ms
21,916 KB |
testcase_10 | AC | 7 ms
11,036 KB |
testcase_11 | AC | 7 ms
10,676 KB |
testcase_12 | AC | 12 ms
13,924 KB |
testcase_13 | AC | 12 ms
14,364 KB |
testcase_14 | AC | 12 ms
12,372 KB |
testcase_15 | AC | 22 ms
17,780 KB |
testcase_16 | AC | 6 ms
9,784 KB |
testcase_17 | AC | 3 ms
7,828 KB |
testcase_18 | AC | 22 ms
18,852 KB |
testcase_19 | AC | 32 ms
21,524 KB |
testcase_20 | AC | 12 ms
13,536 KB |
testcase_21 | AC | 3 ms
7,924 KB |
testcase_22 | AC | 32 ms
21,900 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
ソースコード
import Control.Monad.State main :: IO () main = do w <- readLn d <- readLn let work = do (workLeft, daysLeft) <- get let yaruki = workLeft `div` daysLeft^2 if daysLeft == 1 then return workLeft else do put (workLeft - yaruki, daysLeft - 1) work print $ evalState work (w, d)