文章
211
粉丝
1
获赞
1157
访问
47.6k
#include<bits/stdc++.h> using namespace std; int main(){ int l,r; while(cin >> l >> r){ int cnt = 0; for(int i=l;i<=r;i++){ string str = to_string(i); for(auto it:str){ if(it == '2') cnt++; } } cout << cnt << endl; } return 0; }
登录后发布评论
暂无评论,来抢沙发