700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > c++【IO挂】【输入输出挂】

c++【IO挂】【输入输出挂】

时间:2023-12-28 13:58:17

相关推荐

c++【IO挂】【输入输出挂】

输入挂

int read() //代替scanf,速度更快,俗称输入挂{char ch=' ';int ans=0;while(ch<'0' || ch>'9')ch=getchar();while(ch<='9' && ch>='0'){ans=ans*10+ch-'0';ch=getchar();}return ans;}int n = read();

输出挂

void out(int a) //代替printf,速度更快,俗称输出挂{if(a > 9){out(a/10);}putchar(a%10 + '0');}out(n);

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。