1 条题解

  • -3
    @ 2024-8-12 9:12:42
    #include<bits/stdc++.h>
    using namespace std;
    int a[10],n,m;
    int main(){
    	ios::sync_with_stdio(NULL);
    	cin.tie(0);cout.tie(0);
    	cin>>n>>m;
    	for(int i=n;i<=m;i++){
    		int j=i;
    		while(j!=0){
    			a[j%10]++;
    			j/=10;
    		}
    	}
    	for(int i=0;i<10;i++){
    		cout<<a[i]<<' ';
    	}
    	return 0;
    } 
    
    • 1

    信息

    ID
    597
    时间
    1000ms
    内存
    256MiB
    难度
    4
    标签
    递交数
    29
    已通过
    16
    上传者