Comet OJ - Contest #11 A 水题

Code: 

#include <bits/stdc++.h> 
#define N 3000000
using namespace std;  
char str[N]; 
int main() 
{ 
    int minv=10,cur,len; 
    scanf("%s",str+1),len=strlen(str+1); 
    for(int i=1;i<=len;++i) 
    {
        minv=min(minv, str[i]-'0');     
        cur=str[i]-'0';     
    }  
    printf("%d\n",(minv-cur+10)%10);   
    return 0; 
}

  

posted @ 2019-09-23 10:24  EM-LGH  阅读(131)  评论(0编辑  收藏  举报