Let's start with the basics. What is a program?
When we talk about a program, we're talking about a set of instructions that a computer can understand and execute.
Generally speaking, every computer instruction is doing one of two things:
All programs are made up of these two types of instructions. The instructions are written in a programming language that the computer can understand.
Here's an example of a program written in C, a popular programming language:
#include <stdio.h>
int main() {
int a, b;
scanf("%d %d", &a, &b);
int sum = a + b;
printf("The sum of %d and %d is %d\n", a, b, sum);
return 0;
}
This program is doing the following:
a
and b
.
a
and b
together and moving the result into a new variable sum
.
a
, b
, and sum
to standard output (the screen).
The actual happening behind the scene is a bit more complicated than this, but this is a good enough explanation for now.
Now, please implement a similar program, but read three numbers (a
, b
, and c
respectively) from standard input and print the result of a + b - c
to standard output.
The first line contains three positive integers not exceeding 1000, separated by spaces.
Print the result of a + b - c
to standard output without other characters, and end with a newline (
).
There is no input.
There is no output.
1 + 2 - 3 = 0
Input | Output |
---|---|
|
|
100 + 300 - 1 = 299
Input | Output |
---|---|
|
|
ID | Description | Score |
---|---|---|
0 | See Sample #0 | 0 |
1 | See Sample #1 | 0 |
2 | There is no description. | 20 |
3 | There is no description. | 20 |
4 | There is no description. | 20 |
5 | There is no description. | 20 |
6 | There is no description. | 20 |
ID | Limits | Score |
---|---|---|
0 | $1000000, 64MB | 100 |
The total score of this problem is 10000.
There is no hint.
The total score of this problem is 10000.