A1173 | [COCI-2008_2009-contest6]#2 BUKA
来源COCI
时间限制1s
内存限制128MB
通过 / 提交0/0
题目描述
Quite often there is substantial noise in the classroom during class. Instead of paying attention to what the teacher is saying, the students rather discuss the economic crisis or Croatia's joining the European Union.
The biggest noise often occurs when the students are idle, so teachers will give them tasks with a lot of work to calm them down. In one type of such task, the student must calculate the result of an arithmetic operation on two large numbers.
The arithmetic operations we will consider are adding and multiplication. The operands will be powers of 10 with no more than 100 digits.
Write a program that calculates the result of the operation.
The biggest noise often occurs when the students are idle, so teachers will give them tasks with a lot of work to calm them down. In one type of such task, the student must calculate the result of an arithmetic operation on two large numbers.
The arithmetic operations we will consider are adding and multiplication. The operands will be powers of 10 with no more than 100 digits.
Write a program that calculates the result of the operation.
输入格式
The first line contains a positive integer A, the first operand.
The second line either the character '+' or '*', representing addition or multiplication.
The third line contains a positive integer B, the second operant.
The integers A and B will be powers of 10 and consist of at most 100 digits.
The second line either the character '+' or '*', representing addition or multiplication.
The third line contains a positive integer B, the second operant.
The integers A and B will be powers of 10 and consist of at most 100 digits.
输出格式
Output the result of the operation.
输入输出样例
输入 #1
1000 * 100
输出 #1
100000
输入 #2
10000 + 10
输出 #2
10010
输入 #3
10 + 1000
输出 #3
1010
暂无题解
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted