Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int m=0,i=1,n,u,x;
- int main()
- {
- cin>>n;
- while(i<=n)
- {
- cin>>x;
- i++;
- while(x>0)
- {
- u=x%10;
- x=x/10;
- if(u>m)
- m=u;
- }
- }
- cout<<m+1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement