2026年3月5级第一题之奇葩做法
题目:https://gesp.ccf.org.cn/101/attach/1734457367199776.pdf
此题范围R最大
和正解思路天差地别\
代码:
#include<bits/stdc++.h>
using namespace std;
int main(){
int l,r,sum=0;
cin>>l>>r;
while(l<=r){
int ans=1%l;
for(int i=1;i<=20;i++){
ans%=l;
if(ans==0){
sum++;
break;
}
ans*=10;
}
l++;
}
cout<<sum;
return 0;
}