Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
71652 sh25_ganzy 数字统计 C++ 通过 1 MS 236 KB 313 2025-10-26 18:03:00

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main(){ int L,R,i,i0,cnt=0; cin>>L>>R; for(i=L;i<=R;i++){ i0=i; while(i!=0){ if(i%10==2){ cnt++;; } i/=10; } i=i0; } cout<<cnt; return 0; }


测评信息: