Advertisement
heian

Untitled

Nov 7th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int m=0,i=1,n,u,x;
  6.  
  7. int main()
  8. {
  9. cin>>n;
  10. while(i<=n)
  11. {
  12. cin>>x;
  13. i++;
  14. while(x>0)
  15. {
  16. u=x%10;
  17. x=x/10;
  18. if(u>m)
  19. m=u;
  20. }
  21. }
  22. cout<<m+1;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement