Advertisement
Guest User

muie badii

a guest
Dec 6th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. long long int n, m;
  8. cin>>n>>m;
  9. long long int k;
  10. if(n>2*m)
  11. cout<<n-2*m<<" ";
  12. else
  13. cout<<0<<" ";
  14. k=0;
  15. while(k*(k-1)<2*m)
  16. k++;
  17. cout<<n-k;
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement