report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Multiplication table - MarisaOJ: Marisa Online Judge

Multiplication table

Time limit: 1000 ms
Memory limit: 256 MB
Given a table $A$ consisting of $n$ rows and $m$ columns, where each element at row $i$, column $j$ is $i \times j$ ($A_{i, j} = i \times j$). Rows are numbered from $1$ to $n$, and columns are numbered from $1$ to $m$. If all elements in the table are sorted in non-decreasing order, what is the value of the $k$-th element? ### Input - The first line contains three integers $n, m, k$. ### Output - Print the value of the $k$-th element. ### Constraints - $1 \le n, m \le 10^5$. - $1 \le k \le n \times m$. ### Sample Input: ``` 3 3 6 ``` Output: ``` 4 ```
Binary search on answer
Reading
Minimum maximum
Beautiful number
Multiplication table
k-th digit
Maximum mean
Birthday
Sorting the differences
Collecting
Topic
Binary search
Rating 1000
Solution (1) Solution