3 条题解

  • 1
    @ 2024-12-22 22:03:24

    #include<bits/stdc++.h> using namespace std; int main(){ int a,l,r,times=0; scanf("%d%d",&l,&r); for(int i=l;i<=r;i++){ int j=i; while(j!=0){ a=j%10; j=j/10; if(a==2)times++; } } printf("%d",times); }

    信息

    ID
    708
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    178
    已通过
    94
    上传者