奇怪?
  • 板块灌水区
  • 楼主victoryson
  • 当前回复1
  • 已保存回复1
  • 发布时间2024/10/3 10:22
  • 上次更新2024/10/3 12:38:20
查看原帖
奇怪?
1396341
victoryson楼主2024/10/3 10:22
#include<bits/stdc++.h>
using namespace std;
const string R="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
int x,ans,i;
void tox(char n,int k,int z){
	z--;
	if(z>=0){
		char m=n+z;
		ans+=R.find(m)*k;
		tox(n,k*x,z);
	}
}
int main(){
	char n[30];
	cin>>x>>n;
	tox(n,1,strlen(n));
	cout<<ans;
 	return 0;
}

B3620

2024/10/3 10:22
加载中...