#include<bits/stdc++.h>
using namespace std;
int l,r,ans;
int main(){
scanf("%d%d",&l,&r);
for(int i=l;i<=r;i++){
string s=to_string(i);
for(int j=0;j<s.size();j++) if(s[j]=='2') ans++;
}
prinf("%d",s);
}
[错误] 'to_string' was not declared in this scope
这个搜了百度也不知道哪里的问题,帮看看,求轻喷