結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー |
|
提出日時 | 2017-04-12 13:27:39 |
言語 | Haskell (9.10.1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 900 bytes |
コンパイル時間 | 5,340 ms |
コンパイル使用メモリ | 174,976 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 04:18:57 |
合計ジャッジ時間 | 5,931 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.8.2/environments/default [1 of 2] Compiling Main ( Main.hs, Main.o ) [2 of 2] Linking a.out
ソースコード
ryougae::Int->Int->Int->Intryougae en100 en25 en1 =letcntup1 = cnt1To25 en1 0en1' = en1 - cntup1 * 25cntup25 = cnt25To100 (en25 + cntup1) 0en25' = (en25 + cntup1) - cntup25 * 4cntup100 = cnt100To1000 (en100 + cntup25) 0en100' = (en100 + cntup25) - cntup100 * 10inen100' + en25' + en1'wherecnt1To25 en i | en < 25 = i| otherwise = cnt1To25 (en - 25) (i + 1)cnt25To100 en i | en < 4 = i| otherwise = cnt25To100 (en - 4) (i + 1)cnt100To1000 en i | en < 10 = i| otherwise = cnt100To1000 (en - 10) (i + 1)main = dostr1 <- getLinestr2 <- getLinestr3 <- getLineleten_100 = read str1en_25 = read str2en_1 = read str3print $ ryougae en_100 en_25 en_1