默默放一个输入外挂模板

int scan()  
{  
    int res=0,ch;  
    while(!((ch= getchar())>='0'&&ch<='9')){  
        if(ch==EOF)return 1<<30;  
    }  
    res=ch-'0';  
    while((ch=getchar())>='0'&&ch<='9')  
        res=res*10+(ch-'0');  
    return res;  
} 

 

posted @ 2016-09-08 15:28  知る奇迹に  阅读(139)  评论(0编辑  收藏  举报