module Main where
import System.Environment
-- 摂取したいカロリーに必要な炊く前の白米の重量を計算
calPerGram = (*) $ 1 / (2.2 * 1.68)
--
-- 値段と全重量、接種したいカロリーをひきすうにして、接種したいカロリーあたりの価格を計算
pricePerGram price amount targetCal
= (price
:: Double) / times
where
amount' = amount * 1000
times = amount' / calPerGram targetCal
main = do
bW9kdWxlIE1haW4gd2hlcmUKCmltcG9ydCBDb250cm9sLk1vbmFkCmltcG9ydCBTeXN0ZW0uRW52aXJvbm1lbnQKCi0tIOaRguWPluOBl+OBn+OBhOOCq+ODreODquODvOOBq+W/heimgeOBqueCiuOBj+WJjeOBrueZveexs+OBrumHjemHj+OCkuioiOeulwpjYWxQZXJHcmFtID0gKCopICQgMSAvICgyLjIgKiAxLjY4KQoKLS0KLS0g5YCk5q6144Go5YWo6YeN6YeP44CB5o6l56iu44GX44Gf44GE44Kr44Ot44Oq44O844KS44Gy44GN44GZ44GG44Gr44GX44Gm44CB5o6l56iu44GX44Gf44GE44Kr44Ot44Oq44O844GC44Gf44KK44Gu5L6h5qC844KS6KiI566XCnByaWNlUGVyR3JhbSBwcmljZSBhbW91bnQgdGFyZ2V0Q2FsID0gKHByaWNlIDo6IERvdWJsZSkgLyAgdGltZXMKICB3aGVyZQogICAgYW1vdW50JyA9IGFtb3VudCAqIDEwMDAKICAgIHRpbWVzID0gYW1vdW50JyAvIGNhbFBlckdyYW0gdGFyZ2V0Q2FsCgoKCgptYWluID0gZG8KICAocDphOnQ6XykgPC0gZ2V0TGluZSA+Pj0gcmV0dXJuIC4gbWFwIChyZWFkIDo6IFN0cmluZyAtPiBEb3VibGUpIC4gd29yZHMgCiAgcHJpbnQgLiByb3VuZCAuIHByaWNlUGVyR3JhbSBwIGEgJCB0CiAgCgo=