fadi__'s blog

By fadi__, history, 6 years ago, In English

why always in this problem http://codeforces.net/problemset/problem/233/B x is in range sqrt(n)-100 and sqrt(n)+100

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

x= -s(x)/2 +_ sqrt(s(x)*s(x)+4*n)/2 here s(x)<100 since x**2 < n.

so x is in between -s(x)/2 + sqrt(n) and sqrt(n) +s(x)/2