Шкільний буфет#1286

Шкільний буфет (Розбір)

Аналіз алгоритму

Дімі слід купити всі пиріжки, що є в наявності. Їх число дорівнює a + b + c.

Реалізація алгоритму

Читаємо вхідні дані.

scanf("%d %d %d", &a, &b, &c);

Обчислюємо суму a + b + c і виводимо її.

res = a + b + c;
printf("%d\n", res);

Java реалізація

import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        Scanner con = new Scanner(System.in);
        int a = con.nextInt();
        int b = con.nextInt();
        int c = con.nextInt();
        int res = a + b + c;
        System.out.println(res);
    }
}

Python реалізація

a, b, c = map(int, input().split())
res = a + b + c
print(res)