Advertisement
Guest User

#408 Divizorii Oglinditului

a guest
Feb 17th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main ()
  4. {
  5. long long ogl = 0, n, d, cif, r = 0;
  6. cin >> n;
  7. while (n > 0)
  8. {
  9. cif = n % 10;
  10. n = n / 10;
  11. ogl = ogl * 10 + cif;
  12. }
  13. for (d = 1; d <= ogl; d++)
  14. {
  15. if (ogl % d == n)
  16. r++;
  17. }
  18. cout << r;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement