??????????
查看原帖
??????????
1055666
White___Fox楼主2024/12/2 20:46
# include <bits/stdc++.h>
using namespace std ;
int main ( )
{
	long x , y , s = 0 ;
	cin >> x >> y ;
	for( int i = 1 ; i <= x ; i ++ )
	{
		long z = i ;
		while ( z )
		{
			long f ;
			f = z / 10 ;
			z /= 10 ;
			if ( f == y ) s ++ ;
		}
	}
	cout << s ;
	return 0 ;
}
2024/12/2 20:46
加载中...