AC

哈基米  •  23天前


include <bits/stdc++.h>

using namespace std; int main() {

int n,m,z=0;
cin>>n>>m;
while(n<=m){
	int t=n;
	while(t>0){
		if(t%10==2){
			z++;
		}
		t=t/10;
	}		
	n++;
}
cout<<z;

return 0;

}


评论:

请先登录,才能进行评论