URI Online Judge Solution 1004 Simple Product using Python Programming Language.
Read two integer values. After this, calculate the product between them and store the result in a variable named PROD. Print the result like the example below. Do not forget to print the end of line after the result, otherwise you will receive “Presentation Error”.
Input
The input file contains 2 integer numbers.
Output
Print PROD according to the following example, with a blank space before and after the equal signal.
Input Samples | Output Samples |
3
9 |
PROD = 27
|
-30
10 |
PROD = -300
|
0
9 |
PROD = 0
|
URI 1004 Solution in Python:
A = int(input());
B = int(input());
PROD = A * B;
print("PROD = %d"%PROD);
URI 1004 Solution in C:
#include
int main()
{
int A,B;
scanf ("%d %d", &A, &B);
printf("PROD = %d\n",A*B);
return 0;
}
Comments
Post a Comment