{"problem":{"name":"B. Position in Fraction","description":{"content":"You have a fraction . You need to find the first occurrence of digit _c_ into decimal notation of the fraction after decimal point.","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF900B"},"statements":[{"statement_type":"Markdown","content":"You have a fraction . You need to find the first occurrence of digit _c_ into decimal notation of the fraction after decimal point.\n\n## Input\n\nThe first contains three single positive integers _a_, _b_, _c_ (1 ≤ _a_ < _b_ ≤ 105, 0 ≤ _c_ ≤ 9).\n\n## Output\n\nPrint position of the first occurrence of digit _c_ into the fraction. Positions are numbered from 1 after decimal point. It there is no such position, print _\\-1_.\n\n[samples]\n\n## Note\n\nThe fraction in the first example has the following decimal notation: . The first zero stands on second position.\n\nThe fraction in the second example has the following decimal notation: . There is no digit 7 in decimal notation of the fraction.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"你有一个分数 $\\frac{a}{b}$。你需要在该分数的小数表示中，找到数字 $c$ 首次出现的位置（小数点后）。\n\n第一行包含三个单个正整数 $a$, $b$, $c$（$1 ≤ a < b ≤ 10^5$, $0 ≤ c ≤ 9$）。\n\n请输出数字 $c$ 在小数表示中首次出现的位置。位置从紧接小数点后的第 $1$ 位开始编号。如果不存在这样的位置，请输出 _-1_。\n\n第一个示例中的分数的小数表示如下：。第一个零位于第二位。\n\n第二个示例中的分数的小数表示如下：。其小数表示中不存在数字 $7$。 \n\n## Input\n\n第一行包含三个单个正整数 $a$, $b$, $c$（$1 ≤ a < b ≤ 10^5$, $0 ≤ c ≤ 9$）。\n\n## Output\n\n请输出数字 $c$ 在小数表示中首次出现的位置。位置从紧接小数点后的第 $1$ 位开始编号。如果不存在这样的位置，请输出 _-1_。\n\n[samples]\n\n## Note\n\n第一个示例中的分数的小数表示如下：。第一个零位于第二位。第二个示例中的分数的小数表示如下：。其小数表示中不存在数字 $7$。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ a, b, c \\in \\mathbb{Z} $ with $ 1 \\leq a < b \\leq 10^5 $ and $ 0 \\leq c \\leq 9 $.  \nLet $ x = \\frac{a}{b} $, and let $ d_1, d_2, d_3, \\dots $ be the decimal digits of $ x $ after the decimal point.\n\n**Objective**  \nFind the smallest positive integer $ k $ such that $ d_k = c $. If no such $ k $ exists, return $ -1 $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF900B","tags":["math","number theory"],"sample_group":[["1 2 0","2"],["2 3 7","\\-1"]],"created_at":"2026-03-03 11:00:39"}}