The question and its input output method is given in the document below QUESTION

The question and its input output method is given in the document below QUESTION: You are given n pieces and a m x m board. The rows and columns are numbered from 1 to m. A cell on the intersection of the row and column is denoted as (r, c).The game’s goal is to place n pieces numbered from 1 to n on the board. The ith piece lies on (, ) while the following rule must be satisfied:For all pairs of pieces i and j, | – | >= k or || – | >= k Here, |x| denotes the absolute value of x.Determine the smallest size of the board m x m on which you can put n pieces according to the rules.Input format: The only line contains two integer, n(1 ≤ n ≤ 1000000) denoting the number of pieces and k(1 ≤ k ≤ 1000000).Output format: Print a single integer denoting the minimum value of m denoting the length of sides of the suitable board.Sample input5 2
Sample output: 5Check this link as well Here
Requirements: Code in python .py   |   .doc file

Published
Categorized as Python

Leave a comment

Your email address will not be published. Required fields are marked *