家人们谁懂啊!!!(悬关)
查看原帖
家人们谁懂啊!!!(悬关)
756608
andy605楼主2024/4/27 10:41
#include <bits/stdc++.h>
using namespace std;
string str;
int b;
bool first=false;
int main(){
	cin>>b>>str;
	int k=str.size();
	for(int i=0;i<k;i++){
		if(first&&str[i]!='0') cout<<"+";
		if(str[i]!='0'){
			cout<<"1*"<<b<<"^"<<k-i-1;
			first=true;
		}
	}
	cout<<"\n";
	return 0;
}

到底错在哪里了啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

2024/4/27 10:41
加载中...