HDU 3546(高精度,java写)

本文讨论了如何使用超级计算器软件替代故障的GoldenAdobe计算机进行科学计算。重点介绍了软件中包含的10个寄存器和三种操作:赋值、加法和乘法。详细解释了寄存器操作的实现及最终结果的输出。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Calculator

Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)
Total Submission(s): 173    Accepted Submission(s): 65

Problem Description
Golden Adobe is the most advanced computer for scientific computing in the world. Unfortunately, it broke down. Your task is to write a super computing software to take its place. The software contains 10 registers named from A to J. There are three operations on the registers:
1) Assignment: X=Y
2) Addition: X+=Y
3) Multiplication: X*=Y
Notice that X and Y are two registers, and they may be the same.
Initially, all the registers are stored by integer 1. Your program should operate several operations and output the final result for 10 registers. You may assume that the length of each decimal number stored in the register is no longer than 5000.
 

 

Input
The input contains only one test case including several lines.
Each line contains an operation to be calculated.
The number of operations will no more than 300000.
 

 

Output
The output should contains exactly 10 lines, each line contains an integer denoting the decimal number in the register. See sample test case for further details.
 

 

Sample Input
A+=B A*=A A+=A B+=A C+=B D=B
 

 

Sample Output
8 9 10 9 1 1 1 1 1 1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值