結果
| 問題 | No.634 硬貨の枚数1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-22 17:58:25 |
| 言語 | Haskell (9.10.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 5,194 ms |
| コンパイル使用メモリ | 174,464 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-19 02:29:54 |
| 合計ジャッジ時間 | 7,661 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 66 |
コンパイルメッセージ
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
ソースコード
coins i sk = if sk + i > 10000000 then [] else sk + i : coins (i + 1) (sk + i)
solve _ 0 = 0
solve cs n = 1 + solve cs' n' where
cs' = filter (<= n) cs
n' = n - last cs'
main = readLn >>= print . solve cs where
cs = coins 1 0