Advertisement
Glenpl

Untitled

Dec 17th, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.19 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. int main()
  4. {
  5.     unsigned long long a;
  6.     while(std::cin>>a)
  7.         std::cout<<(unsigned long long)ceil(((-1+sqrt(8*a-7))/2))<<"\n";
  8.     return 0;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement