{"problem":{"name":"Floor Function","description":{"content":"Given are integers $A$, $B$, and $N$. Find the maximum possible value of $floor(Ax/B) - A × floor(x/B)$ for a non-negative integer $x$ not greater than $N$. Here $floor(t)$ denotes the greatest intege","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc165_d"},"statements":[{"statement_type":"Markdown","content":"Given are integers $A$, $B$, and $N$.\nFind the maximum possible value of $floor(Ax/B) - A × floor(x/B)$ for a non-negative integer $x$ not greater than $N$.\nHere $floor(t)$ denotes the greatest integer not greater than the real number $t$.\n\n## Constraints\n\n*   $1 ≤ A ≤ 10^{6}$\n*   $1 ≤ B ≤ 10^{12}$\n*   $1 ≤ N ≤ 10^{12}$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$A$ $B$ $N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc165_d","tags":[],"sample_group":[["5 7 4","2\n\nWhen $x=3$, $floor(Ax/B)-A×floor(x/B) = floor(15/7) - 5×floor(3/7) = 2$. This is the maximum value possible."],["11 10 9","9"]],"created_at":"2026-03-03 11:01:13"}}