zty_luogu @ 2021-08-30 00:42:10
为什么同一道题在洛谷评测姬上AC,在这里就wa了呢
#include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define f(III,MMM,NNN) for(register int III=MMM;III<=NNN;III++)
typedef long long int ll;
#define inf 0x3f3f3f3f
#define linf 0x3f3f3f3f3f3f3f3f
//#define Int int
//#define Long long
//#define Double double
//#define For for
//#define While while
//#define Do do
const int N=1010;
stack <ll> s;
int main(){
//ios::sync_with_stdio(false);
//cin.tie(0);
//cout.tie(0);
ll c;
int a=0;
while(c=getchar()){
if(c=='@')
break;
if(c>='0'&&c<='9')
a=a*10+c-'0';
if(c=='.')
s.push(a),a=0;
if(c=='+'){
int x=s.top();
s.pop();
int y=s.top();
s.pop();
s.push(x+y);
}
if(c=='-'){
int x=s.top();
s.pop();
int y=s.top();
s.pop();
s.push(y-x);
}
if(c=='*'){
int x=s.top();
s.pop();
int y=s.top();
s.pop();
s.push(x*y);
}
if(c=='/'){
int x=s.top();
s.pop();
int y=s.top();
s.pop();
s.push(y/x);
}
}
cout<<s.top();
return 0;
}
by zsuvion @ 2021-08-31 11:00:25
兄弟,万能头都用了,还
#include<iostream>
???
by underline__jian @ 2021-11-01 19:51:38
你谷数据过水