#33161: 答案不用錢


yp11151138@yphs.tp.edu.tw (908-33許劭頎)

學校 : 臺北市私立延平高級中學
編號 : 197089
來源 : [203.72.178.1]
最後登入時間 :
2025-06-13 17:36:28

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n;char colon;float f,ans=0.0;
    string line;
    while(getline(cin,line)){
        istringstream s(line);
        while(s>>n>>colon>>f)
        if(n%2==0) ans=ans-f;
        else ans=ans+f;
        cout<<ans<<endl;
        ans=0.0;
    }
    return 0;
}