Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
38182 yuanhaoxiang 数字统计 C++ 通过 0 MS 196 KB 239 2024-01-25 15:41:46

Tests(1/1):


#include <algorithm> #include <cstdio> using namespace std; int s,t,ans; int main() { scanf("%d%d",&s,&t); for(int i=s;i<=t;i++) for(int j=i;j;j/=10) if(j%10==2) ans++; printf("%d",ans); return 0; }


测评信息: