100分 Subtask #1
查看原帖
100分 Subtask #1
1057197
nobody_here楼主2024/8/11 06:59
#include<bits/stdc++.h>
using namespace std;
string a;
long long i,x=0;
void yy(){
	if(a[i]=='0'){
		i--;
		return yy();
	}
}
int main(){
	cin>>a;
	i=a.length()-1;
	if(a[0]=='-'){
		cout<<"-";
		x=1;
	}
	if(a[i]=='0'){
		yy();
	}
	for(i;i>=x;i--){
		cout<<a[i];
	}
	return 0;
}

2024/8/11 06:59
加载中...