全部TLE是怎么回事啊?
查看原帖
全部TLE是怎么回事啊?
305813
SeRazon楼主2020/6/16 17:55

看了题解还是不知道哪里错了

#include <iostream>
#include <cstdio>
using namespace std;
long long k,t,j=0;
int main(){
    scanf("%d%d",&k,&t);
    for(int y=k;y<=t;++y){
        while(y!=0){
            if(y%10==2) ++j;
            y/=10;
        }
    }
    printf("%d",j);
        return 0;
}
2020/6/16 17:55
加载中...