Apirl Fool's caculator part 2
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem F. Apirl Fool's caculator part 2
题目描述
恭喜你借助超额加成击退了黑暗卫队的入侵,但现在一位精明的商人出现了,它要求你完成一项奇怪的“智能”计算器,要求如下:
Requirement: Write a program that simulates an "intelligent" calculator, but actually performs some "April Fool's" operations on the input mathematical expression.
- The program accepts a mathematical expression from the user, which can include arithmetic operators such as addition, subtraction, multiplication, division, parentheses, and numbers.
- Before calculating the expression, modify the expression: randomly replace operators with incorrect operators (e.g., replace addition with subtraction), insert some random numbers into the digits, or delete some numbers or operators.
- Then, calculate the result of the modified expression and output the result.
输入格式
输入一个愚人节表达式k
输出格式
输出你的答案(你的可能是对的,但是通过看运气)
样例输入1
2024+4+1
样例输出1
2024
样例输入2
4+1
样例输出2
4
数据范围及约定
算法设计文化节——南师大2024年愚人节比赛
- 状态
- 已结束
- 规则
- ACM/ICPC
- 题目
- 12
- 开始于
- 2024-4-1 17:00
- 结束于
- 2024-4-1 21:00
- 持续时间
- 4 小时
- 主持人
- 参赛人数
- 80