21713_Calculator

2022-5-16 18:20| 发布者: Hocassian| 查看: 28| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-4-89505782066400-Problem List-采集的数据-后羿采集器.html

Pro.ID

21713

Title

Calculator

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=21713

AC

0

Submit

1

Ratio

0.00%

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 65536/32768 K (Java/Others)
  • 描述

    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.

    输入

    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.

    输出

    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

    Source

    样例输入

    A+=B
    A*=A
    A+=A
    B+=A
    C+=B
    D=B

    样例输出

    8
    9
    10
    9
    1
    1
    1
    1
    1
    1

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部