3 条题解

  • -1
    @ 2024-10-20 13:17:51
    #include<bits/stdc++.h>
    using namespace std;
    const int N=1e5+10;
    int main(){
    	int n,b,sum=0,i=0;
    	int a[N];
    	cin>>b>>n;
    	while(n){
    		sum+=n%10*pow(b,i);
    		n/=10;
    		i++;
    	}
    	cout<<sum;
    }
    

    信息

    ID
    1218
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    递交数
    336
    已通过
    87
    上传者