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