提交时间:2025-10-26 19:05:13
运行 ID: 71666
#include <iostream> using namespace std; int main() { int a,b,c,d,e=0; cin>>d>>a; for(int i=d;i<=a;i=i+1){ b=i; while(b!=0){ c=b%10; b=(b-c)*1.0/10; if(c==2){ e=e+1; } } } cout<<e; return 0; }