@Problem Archive - competitive programming.
#1st problem: URI Online Judge | 1001 Extremely Basic Adapted by Neilor Tonin, URI Brazil
Timelimit: 1 Read 2 variables, named A and B and make the sum of these two variables, assigning its result to the variable X. Print X as shown below. Print endline after the result otherwise you will get “Presentation Error”.
Input The input file will contain 2 integer numbers.
Output Print the letter X (uppercase) with a blank space before and after the equal signal followed by the value of X, according to the following example.
Obs.: don't forget the endline after all.
Samples Input 10 9 | -10 4 | 15 -7
Samples Output X = 19 | X = -6 | X = 8
#2nd Problem: URI Online Judge | 1002 Area of a Circle Adapted by Neilor Tonin, URI Brazil
Timelimit: 1 The formula to calculate the area of a circumference is defined as A = π . R2. Considering to this problem that π = 3.14159:
Calculate the area using the formula given in the problem description.
Input The input contains a value of floating point (double precision), that is the variable R.
Output Present the message "A=" followed by the value of the variable, as in the example bellow, with four places after the decimal point. Use all double precision variables. Like all the problems, don't forget to print the end of line after the result, otherwise you will receive "Presentation Error".
Input Samples 2.00 | 100.64 | 150.00
Output Samples A=12.5664 | A=31819.3103 | A=70685.7750
#3rd Problem: URI Online Judge | 1003 Simple Sum Adapted by Neilor Tonin, URI Brazil
Timelimit: 1 Read two integer values, in this case, the variables A and B. After this, calculate the sum between them and assign it to the variable SOMA. Write the value of this variable.
Input The input file contains 2 integer numbers.
Output Print the message "SOMA" with all the capital letters, with a blank space before and after the equal signal followed by the corresponding value to the sum of A and B. Like all the problems, don't forget to print the end of line, otherwise you will receive "Presentation Error"
Input Samples 30 10 | -30 10 | 0 0
Output Samples SOMA = 40 | SOMA = -20 | SOMA = 0
#4th Problem: URI Online Judge | 1004 Simple Product Adapted by Neilor Tonin, URI Brazil
Timelimit: 1 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 the message "PROD" and PROD according to the following example, with a blank space before and after the equal signal.
Input Samples 3 9 | -30 10 | 0 9
Output Samples PROD = 27 | PROD = -300 | PROD = 0