#P6467. [COCI 2008/2009 #6] BUKA
[COCI 2008/2009 #6] BUKA
Description
Given two integers with at most digits, and both are powers of , you need to compute the result of either their multiplication or their addition.
Input Format
The input consists of three lines.
The first and third lines each contain an integer, representing the numbers to be computed. The second line contains one character, either * (multiply) or + (add), indicating which operation to perform. The testdata is generated under Windows, so please note the \r contained in the line ending.
Output Format
Output one line containing one integer, which is the result of the operation.
1000
*
100
100000
10000
+
10
10010
10
+
1000
1010
1
*
1000
1000
Hint
Explanation
This problem is translated from COCI2008-2009 CONTEST #6 T1 BUKA。
Translated by ChatGPT 5
京公网安备 11011102002149号