wa求助
查看原帖
wa求助
1559071
hyx114514s楼主2025/1/1 20:19
#include<bits/stdc++.h>
using namespace std;
int main()
{
    int l,r,s=0;
    cin>>l>>r;
    for(int j=1;j<=sqrt(r);j++)
        for(int i=l;i<=r;i++)
        {
            if(i==2) s+=1;
            if(i%(10*j)==2) s+=1;
            if(i/(10*j)==2) s+=1;
        }
    cout<<s<<endl;
    return 0;
}
2025/1/1 20:19
加载中...