首页 > 其他 > 详细

【OI】快读

时间:2019-11-16 18:53:51      阅读:106      评论:0      收藏:0      [点我收藏+]

不必多说。

技术分享图片
#include <cstdio>
#include <cstring>

int read(){
    int x = 0,f = 1;
    char c = getchar();
    
    while(c < ‘0‘ || c > ‘9‘) {
        if(c == ‘-‘) f = -1;
        c = getchar();
    }
    while(c>= ‘0‘ && c<= ‘9‘){
        x = x*10 + c-‘0‘;
        c = getchar();
    }
    
    return x*f;
}

int main()
{
    for(int i = 1; i <= 5; i ++){
        int x = read();
        printf("%d",x);
    }
    
    
    return 0;
}
View Code

 

【OI】快读

原文:https://www.cnblogs.com/dudujerry/p/11872823.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!