{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"hlce","formal_name":"Humanity's Last Code Exam","introduction":"Humanity's Last Code Exam evaluates problem solving and code generation using ICPC World Finals and IOI problems. The project describes 235 problems; this import selects its public ICPC dataset of 146 problems.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://humanity-s-last-code-exam.github.io/website/","indexing_mode":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"ed6756d7-329b-536a-932b-28d22f56909e","task_key":"ICPC~2dWorld~2dFinals--examples--2020~5fM","task_revision_id":"3","upstream_id":"2020_M","short_description":"Trailing Digits","config":"ICPC-World-Finals","split":"examples","body":"{\"platform\":\"atcoder\",\"question_content\":\"## Problem Description\\n\\nA large shipment of doodads has just arrived, and each doodad has a suggested retail price of \\\\( b \\\\) cents. Consumers are more likely to purchase goods when most of the trailing digits are the same. For example, items are more likely to be priced at 99 cents rather than 57 cents. To make your goods more appealing, you’ve decided to sell your goods in bundles. To make a bundle, you choose a positive integer \\\\( k \\\\), and sell \\\\( k \\\\) doodads for \\\\( k \\\\times b \\\\) cents. With an appropriate choice of \\\\( k \\\\), you can have a more pleasing price. For example, selling 57-cent doodads in bundles of size 7 means that each bundle sells for 399 cents, which has two trailing 9s, rather than no trailing 9s of 57. This idea of trailing 9s can be generalized to any other trailing digit: bundles of 692 57-cent doodads sell for 39,444 cents (three trailing 4s) and bundles of one million doodads sell for 57,000,000 cents (six trailing 0s).\\n\\nAfter some thought, you realize that you do not want to make your bundles too large—not only can the price be excessive, but who really needs several million doodads? For any type of doodad, your marketing department has a maximum bundle price of \\\\( a \\\\).\\n\\nGiven the price of a doodad, the desired trailing digit, and the maximum price of a bundle, write a program that optimizes the trailing digits.\\n\\n## Input\\n\\nInput consists of a single line containing three integers \\\\( b \\\\), \\\\( d \\\\), and \\\\( a \\\\), where \\\\( b \\\\) (\\\\( 1 \\\\leq b < 10^6 \\\\)) is the price of a doodad in cents, \\\\( d \\\\) (\\\\( 0 \\\\leq d \\\\leq 9 \\\\)) is the desired trailing digit, and \\\\( a \\\\) (\\\\( b \\\\leq a < 10^{10,000} \\\\)) is the maximum price of a bundle.\\n\\n## Output\\n\\nOutput the maximum number of consecutive occurrences of \\\\( d \\\\) that can appear at the end of a bundle price, given that the price of the bundle cannot exceed \\\\( a \\\\).\\n\\n## Sample Input and Output\\n\\n```plaintext\\nSample Input 1\\n57 9 1000\\nSample Output 1\\n2\\n```\\n\\n```plaintext\\nSample Input 2\\n57 4 40000\\nSample Output 2\\n3\\n```\\n\\n```plaintext\\nSample Input 3\\n57 4 39000\\nSample Output 3\\n2\\n```\",\"question_title\":\"Trailing Digits\"}","display_format":"text","language":"","answer_status":"published","assets":[],"source_url":"https://humanity-s-last-code-exam.github.io/website/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}