51nod1413 权势二进数
一道水的不能再水的题目
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
inline int read(){
int x=0,f=1,ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
return x*f;
}
int main(){
int n=read(),ans=0;
while(n) ans=max(ans,n%10),n/=10;
printf("%d\n",ans);
return 0;
}

浙公网安备 33010602011771号