{"id":24740373,"url":"https://github.com/derektypist/project-euler-031","last_synced_at":"2026-04-30T12:35:02.211Z","repository":{"id":45247417,"uuid":"513439498","full_name":"derektypist/project-euler-031","owner":"derektypist","description":"Find the number of ways to make n pence using any number of coins","archived":false,"fork":false,"pushed_at":"2022-07-13T10:02:41.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-30T17:22:27.883Z","etag":null,"topics":["bootstrap5","css3","dynamic-programming","googlefonts","html5","javascript","project-euler"],"latest_commit_sha":null,"homepage":"https://derektypist.github.io/project-euler-031","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derektypist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-13T08:25:47.000Z","updated_at":"2022-07-26T16:24:46.000Z","dependencies_parsed_at":"2022-07-15T17:47:31.187Z","dependency_job_id":null,"html_url":"https://github.com/derektypist/project-euler-031","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/derektypist/project-euler-031","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derektypist%2Fproject-euler-031","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derektypist%2Fproject-euler-031/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derektypist%2Fproject-euler-031/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derektypist%2Fproject-euler-031/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derektypist","download_url":"https://codeload.github.com/derektypist/project-euler-031/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derektypist%2Fproject-euler-031/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32465009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap5","css3","dynamic-programming","googlefonts","html5","javascript","project-euler"],"created_at":"2025-01-27T23:23:08.936Z","updated_at":"2026-04-30T12:35:02.192Z","avatar_url":"https://github.com/derektypist.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Euler 031 - Coin Sums\n\nIn the United Kingdom the currency is made up of pound (£) and pence (p).  There are eight coins in general circulation:\n\n    1p, 2p, 5p, 10p, 20p, 50p, £1 (100p), and £2 (200p).\n\nIt is possible to make £2 in the following way:\n\n    1x£1 + 1x50p + 2x20p + 1x5p + 1x2p + 3x1p\n\nThe aim is to find the number of different ways that `n` pence can be made using any number of coins.\n\nInformation at [Project Euler 031](https://projecteuler.net/problem=31)\n\n**Hint**\n\n- There are 100 pence in a pound (£1 = 100p)\n- There are coins (in pence) that are available: 1, 2, 5, 10, 20, 50, 100, 200\n- How many different ways you can combine these values to make n pence\n- Use the Dynamic Programming Approach\n\n**Example**\n\nTo make 5p there are 4 ways:\n\n    1,1,1,1,1\n    1,1,1,2\n    1,2,2\n    5\n\n## UX\n\n**Getting Started**\n\nEnter the value in pence (between 1 and 1000) as a whole number (e.g. 200 pence for £2).  Unless you have made an invalid input, you will see the value in pence as well as the number of ways to make n pence using any number of coins.  For example, if you entered 50, you would expect to get 451 ways to make 50 pence using any number of coins.  Click on the Submit Button to clear the information or to start again.\n\n**User Stories**\n\nAs a user, I expect to get an error message, if I do any of:\n\n- Not enter anything in the input field\n- Entering text other than a number\n- Entering a value less than 1 or greater than 1000\n- Entering a number that is not an integer\n\nAs a user, I expect the function `coinSums(50)` to return a number.\n\nAs a user, I expect the function `coinSums(50)` to return 451.\n\nAs a user, I expect the function `coinSums(100)` to return 4563.\n\nAs a user, I expect the function `coinSums(150)` to return 21873.\n\nAs a user, I expect the function `coinSums(200)` to return 73682.\n\n**Information Architecture**\n\nThe function `coinSums(n)` returns a number, where `n` is a number between 1 and 1000.\n\n## Features\n\nAllows the user to enter the value in pence as well as seeing the number of ways that n pence can be made using any number of coins.  Performs checks on valid user input.  If the input is not valid, an error message is displayed.  Despite the title 'Coin Sums', it can be used for other purposes such as finding the number of ways to make 10 runs in cricket using the scores of 1, 2, 3, 4, 5 and 6 and any number of scoring shots.\n\n## Technologies\n\nUses HTML5, CSS3, JavaScript, Bootstrap 5.2.0-Beta1 and Google Fonts.  Dynamic Programming Approach.\n\n## Testing\n\nEnsure all user stories have been met.\n\n## Deployment\n\nDeployed on [GitHub Pages](https://derektypist.github.io/project-euler-031) at the main branch.\n\n## Credits\n\n### Content\n\nWritten by me.\n\n### Acknowledgements\n\n- [Project Euler](https://projecteuler.net)\n- [FreeCodeCamp](https://www.freecodecamp.org)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderektypist%2Fproject-euler-031","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderektypist%2Fproject-euler-031","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderektypist%2Fproject-euler-031/lists"}