希望更丰富的展现?使用Markdown
by VenusM1nT @ 2018-12-14 21:40:09
希望更丰富的展现?使用Markdown
by Lates @ 2018-12-14 21:43:47
你include<stdio.h>
少了
# #
by Lates @ 2018-12-14 21:48:57
# #
by Lates @ 2018-12-14 21:49:09
#
by Lates @ 2018-12-14 21:49:49
```cpp
#include <stdio.h>
int main() {
int l,r,i,x,sum;
scanf("%d %d",&l,&r);
for(i=l;i<=r;i++){
x=i;
while(x>0) {
if(x%10==2) sum++;
x=x/10;
}
}
printf("%d",sum);
return 0;
}
```
貌似大哥你忘记打int main了和return 0;了,但是打了也过不了
另外,
希望更丰富的展现?使用Markdown
by zimindaada @ 2018-12-14 22:12:57
@[深海鱼biss嗷](/space/show?uid=157185)
什么叫本机过了?????
还有这道题这么简单还问??????
by smallfang @ 2018-12-14 22:39:34
你的id有`东西啊 是脑瘫中单派你来的吗@[深海鱼biss嗷](/space/show?uid=157185)
by Last炫神丶 @ 2018-12-14 22:41:39
不要那么不友好啊,我们都是这样过来的
by 土间_土里 @ 2018-12-14 22:51:08
我一开始连在那里提交都不会 还问老师 老师都被我搞蒙了
by 土间_土里 @ 2018-12-14 22:52:09