3 条题解

  • 1
    @ 2025-3-19 22:38:13
    #include<bits/stdc++.h>
    using namespace std;
    
    int main()
    {
        long long ans=0,temp,num;
        char ch;
        cin>>temp;
        while(cin>>ch>>num){
            if(ch=='+'){
                ans=(ans+temp)%10000;
                temp=num;
            }
            else temp=(temp*num)%10000;
        }
        ans=(ans+temp)%10000;
        cout<<ans;
    }
    

    信息

    ID
    107
    时间
    1000ms
    内存
    256MiB
    难度
    5
    标签
    递交数
    162
    已通过
    60
    上传者