You are not logged in. Please login at www.codechef.com to post your questions!

×

Doubt in FLOORI4

It is mentioned in the editorial of this problem that there are only sqrt(n) different values for [n/i] over all i from 1 to n.

Can any one tell me that what is it true?

Link for the editorial :- FLOORI4 Editorial

Problem Link :- Problem

asked 24 Dec '14, 14:38

akshu1's gravatar image

1★akshu1
11
accept rate: 0%

edited 07 Jan '15, 17:42

admin's gravatar image

0★admin ♦♦
19.3k348495534


This is because for i > √N, ⌊ N/i ⌋ < √N. Therefore for i = √N + 1 to N, it has only √N distinct values. And obviously for i from 1 to √N you can have √N different values. So actually the number of distinct values can be at max 2*√N.

Lemme know if this helps! :)
link

answered 24 Dec '14, 15:59

shivam1511's gravatar image

5★shivam1511
4382414
accept rate: 22%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×887
×288
×281

question asked: 24 Dec '14, 14:38

question was seen: 550 times

last updated: 07 Jan '15, 17:42