直接獻上答案XD:
#include<cstdio>
#include<string>
#include<iostream>
#include<stdlib.h>
using namespace std;
int main ()
{
string input;
cin >> input;
int i;
if(input.at(0) == '-')
{
i = 1;
while (i < input.length())
{
cout << input.at(i);
i++;
}
} else {
cout << input << endl;
}
}