結果
| 問題 | No.634 硬貨の枚数1 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-03-22 17:58:25 |
| 言語 | Haskell (9.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 3,899 ms |
| コンパイル使用メモリ | 192,128 KB |
| 実行使用メモリ | 7,976 KB |
| 最終ジャッジ日時 | 2026-04-07 07:03:02 |
| 合計ジャッジ時間 | 4,989 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 66 |
コンパイルメッセージ
Loaded package environment from /home/judge/.ghc/x86_64-linux-9.14.1/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