a53

cifre001

a53
Oct 8th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int n1,n2,nce;
  4.  
  5. int main()
  6. {
  7. cin>>n1>>n2;
  8. while(n1&&n2)
  9. {
  10. if(n1%10==n2%10)
  11. ++nce;
  12. n1/=10;
  13. n2/=10;
  14. }
  15. if(n1||n2)
  16. cout<<"NU";
  17. else
  18. cout<<"DA\n"<<nce;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment