这是我的源代码
#include<bitsdc++.h>
typedef long long ll;
typedef double db;
#define F1(i,a,b) for( int i=(a); i<=(b); i++)
#define F2(i,a,b) for( int i=(a); i<(b); i++)
#define F3(i,a,b) for( int i=(a); i>=(b); i--)
#define F4(i,a,b) for( int i=(a); i>(b); i--)
using namespace std;
stack<int>coun;
int x,y,num,ans;
string s1;
int i,j;
int main()
{
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin>>s1;
while(s1[i]!='@')
{
if(s1[i]>='0'&&s1[i]<='9')
{
num=s1[i]-'0';
}
else if(s1[i]=='.')
{
coun.push(num);
}
else if(s1[i]!='@')
{
if(s1[i]=='+')
{
x=coun.top(); coun.pop();
y=coun.top(); coun.pop();
coun.push(y+x);
continue;
}
else if(s1[i]=='-')
{
x=coun.top(); coun.pop();
y=coun.top(); coun.pop();
coun.push(y-x);
continue;
}
else if(s1[i]=='*')
{
x=coun.top(); coun.pop();
y=coun.top(); coun.pop();
coun.push(x*y);
continue;
}
else if(s1[i]=='/')
{
x=coun.top(); coun.pop();
y=coun.top(); coun.pop();
coun.push(y/x);
continue;
}
}
i++;
}
cout<<coun.top()<<endl;
return 0;
}