Advertisement
Guest User

Untitled

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