为什么本地运行答案正确,但一提交就WA
查看原帖
为什么本地运行答案正确,但一提交就WA
1393834
Recursively_dumb楼主2024/8/19 10:15

以下为代码:

#include<bits/stdc++.h>
using namespace std;
int n,m,a[10];
int main()
{
	scanf("%d%d",&n,&m);
	for(int i=n;i<=m;i++)
	{
		int t=i;
		while(t>0)
		{
			a[t%10+1]++;
			t/=10;
		}
	}
	for(int i=1;i<=10;i++)
		printf("%d ",a[i]);
	return 0;
}
2024/8/19 10:15
加载中...