![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 #include <cstdio> 2 #include <cstring> 3 #include <cstdlib> 4 #define N 111 5 char a[N]; 6 int main() 7 { 8 scanf("%s",a); 9 int len=strlen(a); 10 int x=a[0]; 11 for(int i=1;i<len;i++) 12 if(x<a[i]) 13 x=a[i]; 14 printf("%d\n",x-'0'); 15 return 0; 16 }