跳到正文

闲话

7.20

Super_Diu约 1 分钟
原文
文章信息与版本

文章信息

发布
2025年7月20日
收录
2025年12月12日
更新
2026年11月21日
篇幅
约 1 分钟

版本

  1. v1当前

表达式

C++
#include <bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
ll x,s,t;
char c;
int main(){
	ios::sync_with_stdio(false);
	cin>>t;
	while(cin>>c&&c!='\n'){
		cin>>x;
		if(c=='*')t=t*x%10000;
		else s=(s+t)%10000,t=x;
	}
	cout<<(s+t)%10000;
	return 0;
}
原文