Advertisement
a53

vernrimpdiv

a53
Dec 9th, 2020
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n;
  7. cin>>n;
  8. if(n==1)
  9. cout<<"da\n";
  10. else
  11. {
  12. int nrd=2,d=2;
  13. while(d*d<n)
  14. {
  15. if(n%d==0)
  16. nrd+=2;
  17. ++d;
  18. }
  19. if(d*d==n)
  20. ++nrd;
  21. if(nrd%2)
  22. cout<<"da\n";
  23. else
  24. cout<<"nu\n";
  25. }
  26. return 0;
  27. }
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement