{"problem":{"name":"Repdigit Number","description":{"content":"You are given positive integers $N$ and $M$. Find the maximum positive integer $X$ that satisfies all of the following conditions. *   $X$ is a positive integer less than $10^N$, and all digits in th","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc149_a"},"statements":[{"statement_type":"Markdown","content":"You are given positive integers $N$ and $M$. Find the maximum positive integer $X$ that satisfies all of the following conditions.\n\n*   $X$ is a positive integer less than $10^N$, and all digits in the decimal representation of $X$ are the same.\n*   $X$ is a multiple of $M$.\n\nIf no positive integer $X$ satisfies the conditions, print `-1`.\n\n## Constraints\n\n*   $1\\leq N\\leq 10^5$\n*   $1\\leq M\\leq 10^9$\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $M$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc149_a","tags":[],"sample_group":[["7 12","888888\n\nFour positive integers $X$ satisfy the conditions: $444, 888, 444444, 888888$. The answer is the maximum of them, which is $888888$."],["9 12","888888888\n\nSix positive integers $X$ satisfy the conditions: $444, 888, 444444, 888888, 444444444, 888888888$."],["1 3","9\n\nThree positive integers $X$ satisfy the conditions: $3, 6, 9$."],["1000 25","\\-1\n\nNo positive integers $X$ satisfy the conditions."],["30 1","999999999999999999999999999999"]],"created_at":"2026-03-03 11:01:14"}}