Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- long long int n, m;
- cin>>n>>m;
- long long int k;
- if(n>2*m)
- cout<<n-2*m<<" ";
- else
- cout<<0<<" ";
- k=0;
- while(k*(k-1)<2*m)
- k++;
- cout<<n-k;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement